SOLVED

Convert from utc not showing correct time

Copper Contributor

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?

2 Replies
best response confirmed by Mark1014 (Copper Contributor)
Solution

@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:

  1. Incorrect time showing in Sharepoint List send by Flow 
  2. How Date-Time Columns Work In SharePoint 

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.

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?

 

Mark1014_0-1661863313839.png

 

1 best response

Accepted Solutions
best response confirmed by Mark1014 (Copper Contributor)
Solution

@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:

  1. Incorrect time showing in Sharepoint List send by Flow 
  2. How Date-Time Columns Work In SharePoint 

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.

View solution in original post