I need to display current EST time in a label in Powerapps. Any suggestions as day light saving also should be taken care automatically.
Are you stating that you are in EDT zone currently and you want to display EST instead (since it is currently EDT not EST)?
Or are you in another time zone and want to display the time for the Eastern Time Zone?
If you're in the ET zone, then and you just want to display the current time in a label, you can add a label and set the Text property to : Text(Now(), "hh:mm:ss")
I hope this is helpful for you.
I am in different time zone and want to display current EST time in a label.
Are you stating that you are in EDT zone currently and you want to display EST instead (since it is currently EDT not EST)?
Or are you in another time zone and want to display the time for the Eastern Time Zone?
Thanks Randy for you reply. @RandyHayes
-- I am in diffrent time zone and want to display Current EST time in a label.
So the only function at your disposal for this will be the TimeZoneOffset function. And, it will sort of be a partial solution.
I would consider as a first step convert your current time to UTC -
DateAdd(Now(), TimeZoneOffset(), Minutes)
Then apply an offset to that with DateAdd for your ET.
DateAdd(DateAdd( Now(), TimeZoneOffset(), Minutes ), -4, Hours)
This will adjust the UTC by the ET (-4) hours.
Now...you can see, this is the partial solution part as it will not account for DST.
You might also want to browse this thread recently posted dealing with TimeZone conversions and how to get accurate results. Perhaps that will give you some more detail based on your scenario.
PowerApps by default can easily show time in the local timezone of the device or in UTC timezone using
Text(Now(),DateTimeFormat.UTC) for UTC and Text(Now(),DateTimeFormat.Local) for local timezone. But there is no functionality for changing to a specific timezone. If you know the offset from UTC you can calculate a specific timezone time using the DateAdd function. For Eastern time it would be -5, hours. But that won't adjust for daylight savings time automatically.
Thank you @Pstork1 @RandyHayes for your valuable suggestions. I am searching for any way to take care daylight savings time automatically. May be need to try with some pre-populated Offset table information.
One potential possible long-shot obscure method MIGHT be to have some sort of list of every date in every time zone you care about. If the date contains the TimeZone information, then you can use that date in the TimeZone function - this will then automatically determine the proper adjustment.
The other option is to use a connector to a online timezone service. There you can pass the timezone or geolocation information to it and get the current time in that location. There are a bunch of Time Zone API REST services out there.
Great I will check it out. Thank you @RandyHayes
User | Count |
---|---|
139 | |
135 | |
75 | |
74 | |
69 |
User | Count |
---|---|
215 | |
191 | |
64 | |
62 | |
54 |