cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Highlighted
Regular Visitor

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

Highlighted
Helper II
Helper II

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,583)