cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

Set Visible Time in Future?

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?

3 REPLIES 3
Pstork1
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
ericonline
Community Champion
Community Champion

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)

Pstork1
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,551)