Power Apps TimeZoneOffset Function

We can use the TimeZoneOffset function in Power Apps to adjust for the current time zone from UTC time. We would typically want to save our Dates as UTC time in any database we’re using, and convert those dates to the local time zone when viewing them in our app.

This example, takes the date value named StartTime, which is a UTC time, and subtracts the TimeZoneOffset value in minutes to get the local time.

DateAdd( StartTime, −TimeZoneOffset( StartTime ), TimeUnit.Minutes )

DateAdd, DateDiff, and TimeZoneOffset functions - Power Platform | Microsoft Learn


Date
December 2, 2023
Tags
Architect
Kudos
Buy me a Coffee
Support this site.