cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CorruptZeus
Helper I
Helper I

Issue with Date on a word document

I have a flow that takes an Issue Date and then adds 30 days from that date and updates an End Date column with the new date. This flow is a for a library that is connected to word documents, we are running into an issue where every time the date is updated, it is correct in the column, say for today 5/27/2022 + 30 days = 6/26/2022. However, in the word document it shows up as one day less, so on the word document it shows 6/25/2022. Does anyone know a fix for this?

 

CorruptZeus_0-1653675476238.png

In the Sharepoint library^

 

CorruptZeus_1-1653675527326.png

 

In the word document ^

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

The problem is a time zone shift.  When you read or input a date in SharePoint using the SharePoint interface it automatically uses the time zone the server is in.  But the date is then stored as UTC.  If SharePoint retrieves the date it automatically shifts it back to the server's time zone again.  When you read or write it using Power automate you have to do that translation yourself.  So when you read the date using a flow you need to convert it to the right time zone manually.  To do that you can use AddMinutes() and the TimeZoneOffset() function.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

The problem is a time zone shift.  When you read or input a date in SharePoint using the SharePoint interface it automatically uses the time zone the server is in.  But the date is then stored as UTC.  If SharePoint retrieves the date it automatically shifts it back to the server's time zone again.  When you read or write it using Power automate you have to do that translation yourself.  So when you read the date using a flow you need to convert it to the right time zone manually.  To do that you can use AddMinutes() and the TimeZoneOffset() function.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Ah, Thanks for that, I ended up just creating a new column and having that column being a day ahead of the initial column so that when word takes it they both have the same date. Maybe I'll make those changes you suggest in the future, but for now I'll keep it as is. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,847)