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

As usual, a problem with datetime conversion between flow and sharepoint

Dear community,

 

I am facing a quite particular issue.

I send a time from the form. let's say 9.30

Kernel52_0-1616006785249.png

 

 

In my flow, I convert it from utc+1 (that is my timezone) to utc using the convert function, to store it to sharepoint. On my flow, it shows well that it sends 8.30 as a time.

Kernel52_1-1616006829367.png

Kernel52_2-1616006893398.png

 

On sharepoint, I have configured the regional settings to be utc+1.

Kernel52_3-1616006949094.png

 

Then, my calendar item, shows 10.30 instead of 9.30.

 

If change the timezone in SharePoint to UTC, then it shows 8.30 as it is expected.

 

So, my question is, why does it show 10.30 instead of 9.30.

Why on earth this is happening?

 

Is there a daylight time that I need somewhere to take into consideration?

If this is the case, then I am not able to store the time correctly half of the year 😕

 

Any suggestion is more than welcome!

1 ACCEPTED SOLUTION

Accepted Solutions
Kernel52
Frequent Visitor

Hi @jinivthakkar,

 

In the end it was not overthinking or over complicating the situation, it is what it is but I was missing a key element.

 

It took me a couple of days, but I found what the problem is.

 

When I used the conversion inside flow, I was only passing the hour, but not the date. Obviously, the system could not know the if the DST is in effect (Daylight saving Time). Hense it would always convert my hour to UTC but did not know what the original hour was.

I added the date to the string for conversion and it worked as expected.

 

 

Kernel52_0-1616582631809.png

 

This way, if the event is during DST period, the system will do the necessary to adapt it.

 

For any person who might end up on this post

The expected dateTime format in Sharepoint is Date T Time

(YYYY-MM-DD)T(HH:MM:SS)Z (where Z is optional)

 

 

 

 

View solution in original post

3 REPLIES 3
jinivthakkar
Super User
Super User

@Kernel52 just try to format the time instead of adding utc or doing all other things. I think you are over thinking and making in more complex.

 

Just try something like this

formatDateTime(outputs('Get_item')?['body/Created'],'yyyy-MM-dd hh:mm')

In above example I am passing dynamic datetime value from created, you can pass your value.

 

Hope this helps.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Kernel52
Frequent Visitor

thanks for your advice.

 

I will give it a try although the conversion in my flow seems ok.

 

Maybe I should post this question in Sharepoint forum too. 🤔

Kernel52
Frequent Visitor

Hi @jinivthakkar,

 

In the end it was not overthinking or over complicating the situation, it is what it is but I was missing a key element.

 

It took me a couple of days, but I found what the problem is.

 

When I used the conversion inside flow, I was only passing the hour, but not the date. Obviously, the system could not know the if the DST is in effect (Daylight saving Time). Hense it would always convert my hour to UTC but did not know what the original hour was.

I added the date to the string for conversion and it worked as expected.

 

 

Kernel52_0-1616582631809.png

 

This way, if the event is during DST period, the system will do the necessary to adapt it.

 

For any person who might end up on this post

The expected dateTime format in Sharepoint is Date T Time

(YYYY-MM-DD)T(HH:MM:SS)Z (where Z is optional)

 

 

 

 

View solution in original post

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,063)