cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jja
Helper V
Helper V

wrong date passed from sharepoint list to word

Hi

I have a flow that creates docx file using quick parts. The issue is in sharepoint list i have datefrom which is 2020-12-21. THis is entered by user. Column format is datetime. 

in my get item action i can crealrly see that it returns 2020-12-21

 

in acion Update file properties i can also see that it passes correct date 2020-12-21 and it generates the docx file in a sharepoint library but when i open this generated file i see that date is 2020-12-20. 

I have checked my sitecollection region - it is set to my region UTC+2.

I tired Formatdatetime tried converting to timezone nothing seems to be working

 

I also noticed if i return as result to one of the work fields expresion utcnow() it return 10 hours before my current time zone.

if i addhours(utcnow(),2) then it returns my current good time. 

Anybody knows the clue what is happening?

Any suggestions pls?

2 REPLIES 2
ScottShearer
Super User
Super User

@jja 

Internally, SharePoint stores all dates and times as UTC.  Have you tried converting the date that you use in the update file properties to UTC?  In other words, send the time in UTC to SharePoint?

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

Scott

Hi @ScottShearer 

I have tried this

convertTimeZone(body('Get_item')?['datefield'],'UTC','FLE Standard Time','yyyy-MM-dd HH:mm:ss')

FLE Standart Time is my corrent zone

You mean i need to convert UTC to UTC?

Can you help to write formula for my field?

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (1,400)