cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ShriAzure
Level: Powered On

Retreiving DateTime value from SharePoint List

 

I am trying to create a powerapp to display values from a SharePoint List. It auto-converts the datetime values to UTC and I couldn't get it to show them in the local time zone.

 

 SharePoint List value7/14/2017 12:00 AM  (Central Time)
PowerApps display value7/13/2017 07:00 PM (UCT)

 

I tried to manually add +5 hours to the time but there doesn't seem to be a TimeAdd function like DateAdd.

 

Do we have any workaround?

 

Thank you!

 

Shri

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Retreiving DateTime value from SharePoint List

Hi @ShriAzure,

 

 

Check to see if the following article would be helpful:

DateAdd, DateDiff, and TimeZoneOffset functions in PowerApps

 

If you using PowerApps Studio, and the local time zone is the same as the time zone under the SharePoint site, then PowerApps should handle the Time correctly without any modification.

 

Further, if the time displays in the wrong timezone, please take use of the TimeZoneOffset function to convert from/To UTC:

To convert to UTC (Coordinated Universal Time), add the TimeZoneOffset for the given time.

DateAdd( TimeVariable, TimeZoneOffset(), Minutes )

To convert from UTC, subtract the TimeZoneOffset (by adding the negative) for the given time.

DateAdd( TimeVariable, -TimeZoneOffset( StartTime ), Minutes )

Regards,

Michael

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

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Retreiving DateTime value from SharePoint List

Hi @ShriAzure,

 

 

Check to see if the following article would be helpful:

DateAdd, DateDiff, and TimeZoneOffset functions in PowerApps

 

If you using PowerApps Studio, and the local time zone is the same as the time zone under the SharePoint site, then PowerApps should handle the Time correctly without any modification.

 

Further, if the time displays in the wrong timezone, please take use of the TimeZoneOffset function to convert from/To UTC:

To convert to UTC (Coordinated Universal Time), add the TimeZoneOffset for the given time.

DateAdd( TimeVariable, TimeZoneOffset(), Minutes )

To convert from UTC, subtract the TimeZoneOffset (by adding the negative) for the given time.

DateAdd( TimeVariable, -TimeZoneOffset( StartTime ), Minutes )

Regards,

Michael

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

View solution in original post

ShriAzure
Level: Powered On

Re: Retreiving DateTime value from SharePoint List

Thanks! This worked.. PowerApps Studio, SharePoint site are in the same local time zone. The SharePoint is hosted in the cloud (Office 365) if something that made PowerApps didn't auto-handle the time.

 

Thanks again! Your quick response is highly appreciated.

 

Shri

NPBA_AT
Level 8

Re: Retreiving DateTime value from SharePoint List

Can you please advise what is good practise for storing and displaying dates and times in this scenario. We are a global organisation, our Offfice 365 tenancy is in the USA and I am writing Powerapps for use in New Zealand. The Language() function returns "en-US" which is not correct for our users. There is no language tag for New Zealand. How is this best managed?

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 305 members 3,556 guests
Please welcome our newest community members: