cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hasitha360
Frequent Visitor

Incorrect Sharepoint Date & Time List Field Update

I have an approval workflow linked to a sharepoint list, that updates status of a list item based on the response of the approver. There are two date and time fields in a list item. The issue is that when the list item is updated using the Update List Item action, the two date and time fields get incorrect values. There's a 7 hour difference between the initial list item values and the updated list item values. Below is an example.

 

Initial List Item Values (Before Update)

Visitor Arrival: 4/16/2017 9:00 AM
Visitor Departure: 4/16/2017 12:00 PM

 

Updated List Item Values (After Update)

Visitor Arrival: 4/16/2017 2:00 AM
Visitor Departure: 4/16/2017 5:00 AM

 

Can somebody help me out please? Below is a screenshot of the workflow.

 

Manage your flows - Microsoft Flow (1).jpg

 

10 REPLIES 10
v-monli-msft
Community Support
Community Support

Hi hasitha360,

 

Flow currently returns dates from SharePoint items in UTC, unless you apply a transformation. Currently, the only transformations allowed are the ones by formatDateTime as documented at https://docs.microsoft.com/en-us/rest/api/logic/definition-language

 

We are considering conversions to specified time zones in the future, as a function or as an extra action. Please stay tuned!

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Mona,


Thanks for your explanation and this is very well understood.


I have already converted the date time values to my home time zone (UTC+5:30) by adding 5.5 hours to UTC date time values. I'm using these converted date time values in Send Email actions.


But when the SharePoint Update List Item action is used, there’s a 7 hour difference between the input and the output. Thus, correcting the time zone (i.e. adding 5.5 hours) doesn’t solve this issue. Any reason why there’s a 7 hour difference instead of 5.5 hours difference?


Thanks!

Anonymous
Not applicable

Hi hasitha360,

 

I have a very similar issue while using flow, which takes item dates and uploads it into the excel file.
Already found out that it's not excel or Onedrive fault. When flow gets the item, it takes date value and adds -2hour every time. Changed value it adds into excel. Example below. 
Unbenannt.PNG

Still, can't find any solution.

What time zone are you in?

Anonymous
Not applicable

I'm in UTC+2. 
Finally, I took solution to use calculated SharePoint column and convert  DateTime values into =TEXT.
Because I couldn't  couple my @formatdatetime(triggerBody()?['Startzeit'],'yyyy-MM-dd hh:mm') and @addhours(triggerBody()?['Startzeit'],2) compose actions together.

@v-monli-msft@Anonymous@hasitha360
I am also having the same time problem but instead adding the time its subtracting time when i insert my dat in sharepoint list.
Now the convert functions are also there.
I am using convert time zone action .
Its showing me the correct output, but when i insert data in my sp list it subtracts approx 8 hrs .
How to avoid this? 

maxtarneberg
Advocate II
Advocate II

Hi guys,

 

I am getting incorrect date values to the tune of a year out!!

 

I have a form with date pickers connected to SP List Text columns.

 

Update is set toText(Datepicker1.SelectedDate, "dd/mm/yyyy")

Default is set to ThisItem.MyDate both for Datacard and DatePicker within

Other controls and labels within the datacard are capable of retreiving the correct date as a default with ThisItem.MyDate.

If I then set the DatePicker default to be Label1.Text, it still reads false without error.

I have 5 datepickers in the form, only this one doesnt work.

 

My SPList is showing the correct date, and my SubmitForm works to add/overwrite dates.

 

My submitted date is 15/05/2018, but when I open up the screen again after submit it stubornly says 05/03/2019!!

 

"05/03/2019" is an irrelavant date that does not appear anywhere in my List or anywhere else, where has PA got it from?

 

Tried deleting Datepicker and replacing, no luck.

 

BTW - My timezone is GMT, but a year out?!?, I ought to be on Mars!

danishsaj
Regular Visitor

I was able to fix the issue by updating the site's timezone under Site Settings -> Site Administration -> Regional Settings -> [Set your local timezone].

 

After this change, I refreshed the SP list page and the datetime showed up correctly.

 

Thanks this worked for me

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Kudoed Authors
Users online (2,382)