cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BP-PT
Helper II
Helper II

Converting Time Issues

Hello,

 

I'm currently trying to convert the time, both to change the format of the date and time, whilst also changing to my local timezone. Having issues with this, as it's not converting to the correct time that I'm after...

 

Convert TimeZone settings.PNG

Convert Timezone input and output.PNG

 

Thanks,

Billy  

10 REPLIES 10
ScottShearer
Super User
Super User

@BP-PT 

It appears as though the source time is coming from SharePoint and you want to convert to UTC - that may be the issue.  SharePoint stores all dates/times in UTC time, so there should be no need to convert the time zone.  

You might consider setting both source and destination time zones to UTC - that will just allow you to format the date/time.  You could also use and expression.

 

 

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

Scott
BP-PT
Helper II
Helper II

@ScottShearer , thank you for your response, much appreciated.

 

I'm unfortunately unable to make changes as mentioned, due to me having inefficient permissions. As such, would you please be able to advise on any applicable workarounds I may be able to try, such as an expression?

@BP-PT 

How are you going to use the output of the Convert Time Zone action?

 

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

Scott

@ScottShearer ,

 

I'm trying to make the time a start time for a calendar entry. Please see below.

 

BPPT_0-1629733837449.png

Thanks,

Billy

BP-PT
Helper II
Helper II

Would really appreciate any help on this...

@BP-PT 

Give this a try please...

First remove the format string from your convert time zone action and test.

 

If that doesn't work, try the following:

Do not use the convert time zone action.  Just use the time date and time directly from SharePoint - SharePoint stores all times internally in UTC time.  In addition, reference the date and time directly from the SharePoint column in your addMinutes() expression.

You don't need to worry about converting the date to your local format.

 

 

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

Scott

Thanks @ScottShearer ,

 

I've just tried this. This has outputted the time, but when setting the time of the list item, the scheduled time is actually an hour later than that. Additionally, if I am able to get the start time correct, is there a way that I can get the end time to be 30 mins later than the start time pulled directly from the list (SharePoint)?

 

Any suggestions would be much appreciated.

 

Billy

ScottShearer
Super User
Super User

@BP-PT 

For the start time, use an add hours expression and add 1 hours.

For the end time, use an addMinutes expression and add 90 minutes.

 

 

 

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 ,

 

Thanks for that. Apologies, please can you provide slightly more info on this, as I am new to this.

 

Please see below for current settings:

BPPT_0-1630515307318.png

 

Thanks

 

How about this...

For the start time, use the following expression:

addHours([replace with ref to SharePoint column], 1)

For end time use the following expression:

addMinutes([replace with ref to SharePoint column], 90)

 

 

 

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

Scott

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 (2,173)