cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jja
Resolver I
Resolver I

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 III
Super User III

@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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (46,533)