I have a splash screen (label control) I need to display in my app at a certain date time AND TIMEZONE.
OnStart of app:
- Set(varNow, Now())
Visible property of label control:
- If(varNow >= DateTimeValue("4/20/2021 06:00:00 AM"), true, false)
The challenge is, I'm on Pacific time developing the app but need the splash screen to show at 0600 Central time.
I've always been a bit fuzzy on how PowerApps handles this because it does some things "automagically".
Ideas?
Yes, that's exactly what I was suggesting. You may have to make some other provisions if you are worried about Daylight savings vs Standard time in the future. For example you want it to only display during working hours so you are testing a range from 6:00 AM to 6:00 PM and want it to work on any day of the year. But for this specific request just hard coding the time for the equivalent in CDT will work.
Thank you @Pstork1 . I follow you on the first assertion: Changing varNow to UTC time.
I'm not quite following on the second: "Then compare that to 6:00 am adjusted from UTC to Central timezone."
Should I change the comparison time to 11AM UTC (6AM CDT)?
- If(varNow >= DateTimeValue("4/20/2021 11:00:00 AM"), true, false)
When setting your varNow in OnStart adjust it for UTC like this.
Set(varNow,DateAdd( Now(),TimeZoneOffset(Now()),Minutes))
Then compare that to 6:00 am adjusted from UTC to Central timezone.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2