web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Use timer to update field
Power Apps
Answered

Use timer to update field

(0) ShareShare
ReportReport
Posted on by 505

I would like to use the timer input to update another field. How can I use this to start and stop and input the total time into another field to be saved? It is being used to track how long a task takes to complete.

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @send2mark,

    Do you want to calculate the time duration between the time you start the timer and the time you end the timer?

     

    I'm just curious as to why we think it's necessary to use a timer here?

    Could we not just store the time that the user click the start button into a variable (eg on the OnSelect property of the start button)? Then on the Submit button, we can work out the duration by calculating the difference between the current time and the initial time.

     

    Anyway, here is a trick if you insist on a Timer to achieve this.

    1). Set the Duration as long as you want to avoid its resetting.

    2). Set the OnTimeStart property as a variable to record the start time:

    Set(StartTime,Now())

    3). Set the OnSelect property as another variable to record the end time you click the Timer to end itself:

    Set(EndTime,Now())​

    4). Add a label to display the time difference between start time and end time:

    DateDiff(StartTime,EndTime,Seconds)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard