cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lmauriceparker
Helper I
Helper I

Countdown Timer

Is it possible to have the timer display the # of hours, minutes, seconds until it gets to 0?

 

For example, if an event starts 24hrs from now, I want users to log into the app and see a counter counting down from 24:00:00 hours. As the log into the app periodically, the time should still be counting down until 00:00:00.

 

If this is possible

1 ACCEPTED SOLUTION

Accepted Solutions
mr-dang
Community Champion
Community Champion

Hi,

You would modify the Text property of the Timer to change what it displays. Timers have a Value and a Duration property. If you make the total duration subtract the current time value, you have your countdown:

 

Original:

 

Text(Time(0, 0, Timer1.Value/1000), "hh:mm:ss")

 

Countdown:

 

Text(Time(0, 0, (Timer1.Duration-Timer1.Value)/1000), "hh:mm:ss")
Microsoft Employee
@8bitclassroom

View solution in original post

3 REPLIES 3
mr-dang
Community Champion
Community Champion

Hi,

You would modify the Text property of the Timer to change what it displays. Timers have a Value and a Duration property. If you make the total duration subtract the current time value, you have your countdown:

 

Original:

 

Text(Time(0, 0, Timer1.Value/1000), "hh:mm:ss")

 

Countdown:

 

Text(Time(0, 0, (Timer1.Duration-Timer1.Value)/1000), "hh:mm:ss")
Microsoft Employee
@8bitclassroom

View solution in original post

I wanted a solution to show a countdown in seconds.  This got me there thanks.  I just added 

 

Right(Text(Time(0, 0, (Timer1.Duration-Timer1.Value)/1000), "hh:mm:ss"),2)

 

@leyburn19 

You could also try to set time format  😊

 

Text(Time(0, 0, (Timer1.Duration-Timer1.Value)/1000), "ss")

 

And if you want to show only one digit (i.e. 5 instead of 05), just leave single s:

 

Text(Time(0, 0, (Timer1.Duration-Timer1.Value)/1000), "s")

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (92,250)