Forum Discussion
Convert from utc not showing correct time
Good afternoon,
I have a workflow which inputs the time an action has been completed when the user changes the status to complete. I am using the below.
formatdatetime(convertFromUtc(utcnow(),'Eastern Standard Time'),'yyyy-MM-dd HH:mm')
When I test this using a manual trigger in a compose action, the date time are shown in my local time as expected.
However when I put it in an update item action for a field using the expressions. It places a date and time as expected but the time shown is now 7 hours off. Thoughts?
Mark1014 The problem is that SharePoint stores dates/times in UTC time zone and automatically translates it to the regional settings in the site or user's settings.
So, you need to provide date time values accordingly. For more information, check:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Mark1014 The problem is that SharePoint stores dates/times in UTC time zone and automatically translates it to the regional settings in the site or user's settings.
So, you need to provide date time values accordingly. For more information, check:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Mark1014Copper Contributor
Ah okay. So I should be using UTCNow() without any conversion. Thank you.
Update: I am now just using utcnow(). It seems to have worked for the first workflow.
However the second workflow (Video Editing) is showing a time 3 hours off. Both of these are just using the utcnow() to pass the date time to the field in sharepoint. Thoughts?