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 / Timer not starting fro...
Power Apps
Unanswered

Timer not starting from 00:00:00

(0) ShareShare
ReportReport
Posted on by 220

Hello, I have a timer function which starts a timer. It was working fine. but since yesterday the timer is not starting from 00:00:00 , it start from 23:59:56. Below is the func which displays the time.. Can anyone help ?

 

 

 

If(ThisItem.Running = 1,
Text(Time(0, 0, DateDiff(ThisItem.StartDateTime, Now(), Seconds) + Sum(Filter(colTimers, ParentId = ThisItem.RecordId), SessionTime) + secCount), "[$-en-US]hh:mm:ss")
, Text(Time(0, 0, Sum(Filter(colTimers, ParentId = ThisItem.RecordId), SessionTime) + ThisItem.SessionTime), "[$-en-US]hh:mm:ss"))

 

 

 

I have attached the video also showing the error. please suggest

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @P_SA ,

    What is the Reset value of the timer?

  • P_SA Profile Picture
    220 on at

    Hi @WarrenBelz  ,
    It is a label in the app and not a timer control.   Sorry if i was not clear in my explanation.
    When I click on start timer button in app , it basically triggers an API method in Dynamics 365 and starts recording the time which is displayed in the app.  When i check  the table in d365 , it is recording the time correctly, however in the app, it shows a weird behaviour . ie.  starts 23:59:56, ideally it should start from 00:00:00.

     

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Thanks @P_SA ,

    When you mentioned a function starting a timer, I assumed it was actually a timer. I have parsed your code below

    If( 
     ThisItem.Running = 1,
     Text(
     Time(0, 0, 
     DateDiff(
     ThisItem.StartDateTime, 
     Now(), 
     Seconds) + 
     Sum(
     Filter(
     colTimers, 
     ParentId = ThisItem.RecordId
     ), 
     SessionTime
     ) + secCount
     ), 
     "[$-en-US]hh:mm:ss"
     ),
     Text(
     Time(0, 0,
     Sum(
     Filter(
     colTimers, 
     ParentId = ThisItem.RecordId
     ), 
     SessionTime
     ) + 
     ThisItem.SessionTime
     ), "[$-en-US]hh:mm:ss"
     )
    )

    Obviously SessionTime has a lot to do with this - how is this calculated? I will also tag a couple of my colleagues @Anonymous and @PowerAddict here as I have not seen anything like this before. 

  • P_SA Profile Picture
    220 on at

    hi @WarrenBelz  ,  the sessiontime is a logic written on the d365 side, which basically keeps a count of the sessions. 
    for example : when i start the timer function and stop it  after 10 seconds , the sessiontime is 10,  again if the start the timer it starts from 0 and adds up the sessiontime value .. each session will have a value which sums up to the total sessiontime. 

     


     I have uploaded a short video for your reference.  I have divided the formula into two parts in labels to show the values . 

     

    first part of the formula : 

     

     

    Text(
     Time(0, 0, 
     DateDiff(
     ThisItem.StartDateTime, 
     Now(), 
     Seconds) + 
     Sum(
     Filter(
     colTimers, 
     ParentId = ThisItem.RecordId
     ), 
     SessionTime
     ) + secCount
     ), 
     "[$-en-US]hh:mm:ss"

     

     

     

    Second part :  Label is totalsessiontime  in the video 

    Text(
     Time(0, 0,
     Sum(
     Filter(
     colTimers, 
     ParentId = ThisItem.RecordId
     ), 
     SessionTime
     ) + 
     ThisItem.SessionTime
     ), "[$-en-US]hh:mm:ss"
     )

     

     

    it is the first part which is giving the error i believe. i.e it shows 23:59:56. 

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @P_SA ,

    I am a SharePoint user and I don't think my experience will solve this for you - that is why I tagged two colleagues who may deal with this. I will keep a monitor on the thread to ensure it gets some attention from someone.

  • Community Power Platform Member Profile Picture
    on at

    @WarrenBelz  @P_SA , I'm not a Dynamics 365 user so unfortunately cannot assist you with this. If it was working and now it's not, and you haven't made any code changes,then it seems like a MS issue. Maybe follow up with one of the Forum moderators?

     

    @v-xida-msft 

  • P_SA Profile Picture
    220 on at

    @v-xida-msft  Could you please suggest ?

  • P_SA Profile Picture
    220 on at

    Hello, I noticed different behavior on desktop and mobile app.. when i start the timer from my mobile it starts perfectly from 00:00:00 , but on desktop it starts from 23:59:56 ...  Any idea why this could happen?

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Sorry guys, it will be tough for me to replicate the issue and isn't something I can answer off the top of my head. If we can do a screenshare, I may be able to help. Let me know.

    Thanks,
    Hardit Bhatia
    https://thepoweraddict.com

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard