You're encountering a common timezone issue with date/time conversions in Power Automate. Even though you're setting the time to 11:59 PM, the flow is interpreting and storing it in UTC, and then Dataverse is displaying it based on your user's timezone (UTC-05:00), resulting in the 6-hour difference.
Here's how to fix it within your Power Automate flow:
1. Specify Timezone in parseDateTime
(Crucial):
The parseDateTime
function can take a timezone parameter, but you're currently using en-US
for the locale, not the timezone. You must explicitly tell the function that your input date/time string is already in a specific timezone before converting it to UTC.
Since your date string doesn't include timezone information, Power Automate assumes it's in the current timezone of the flow's execution environment (which is often UTC).
2. Set the Timezone to UTC-05:00 for the parseDateTime
function:
America/New_York
is an example. You should find the IANA name for your specific region that uses UTC-05:00.3. Convert to UTC (If Necessary):
If your Dataverse DateTime field is stored in UTC (which is recommended), you might need to explicitly convert the parsed date/time to UTC after parsing it in the compose action. However, the above step should handle the conversion.
4. Update Record:
When you update the Dataverse record, the DateTime value you're sending should now be correctly interpreted as 11:59 PM in your specified timezone. Dataverse will store it in UTC, but display it correctly in your user's timezone.
Complete Example (Compose Action Expression):
parseDateTime(concat(triggerOutputs()?['body/retentiondate'], 'T23:59:59.000'), 'yyyy-MM-ddTHH:mm:ss.fff', 'America/New_York')
Explanation:
'America/New_York'
) in the parseDateTime
function, you're telling Power Automate that the input date and time are in that timezone.You have a text-based date column in Dataverse and want to convert it to a Date or DateTime column. This is a common data migration or integration challenge. Here's a breakdown of how to approach this, along with important considerations:
1. Dataverse Web API (For larger datasets or programmatic updates):
If you're dealing with a large number of records or need to automate this conversion, the Dataverse Web API is the most efficient method.
2. Power Automate (For smaller datasets or simpler conversions):
For smaller datasets or if you prefer a no-code/low-code approach, Power Automate can be a good option.
3. Excel Import/Export (For smaller datasets):
If you have a very small number of records, you could use Excel:
Important Considerations:
Which Method to Choose:
André Arnaud de Cal...
292,286
Super User 2025 Season 1
Martin Dráb
231,064
Most Valuable Professional
nmaenpaa
101,156