[Solved] Date Field Shows Wrong Date in Power Automate | CloudFronts

[Solved] Date Field Shows Wrong Date in Power Automate

Introduction:

We recently noticed the Power Automate Trigger body showing a date prior to the date selected in CRM.

This behavior was not expected because the field was set to Date Only and so the time zone would not cause this problem.

However, after discussion we found that :

The behavior of field was set to User Local and so when this field will be set it will be seen as per the user time zone settings as Power Automate processes the Date in UTC Format.

All existing date/time fields in CRM are set as User Local by default.

Given below are the two approaches by which we can get the proper date in Power Automate.

Approach 1:

Create a new field in CRM with Format and Behavior set to Date Only.

The date for this field will be correctly captured by trigger in power automate.

Approach 2:

Create a formula in Power Automate to add 1 day to the date coming from CRM, using add days expression.

Adddays(parameter from which date is coming from, number of days to add, format of date[optional])

Eg: addDays(triggerBody()?[‘Fieldnamexyz’],1)

Conclusion :

The above workaround can help rectify the Date in Power Automate.


Share Story :

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close