News:

  • June 25, 2026, 05:09:21 PM

Login with username, password and session length

Author Topic: Displaying timer values in minutes/seconds  (Read 7118 times)

ElroyJetson

  • Full Member
  • ***
  • Posts: 36
Displaying timer values in minutes/seconds
« on: March 11, 2017, 07:44:01 PM »
Hi all,

I have some timers set-up for certain events, and I need to display the .acc values in minutes/seconds. I know that the standard time base is milliseconds, but I only want to display the minutes and seconds values to the operators. I cant figure out how to convert the millisecond data to the corresponding minute/seconds values....


BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6161
  • Yes Pinky, Do-more will control the world!
Re: Displaying timer values in minutes/seconds
« Reply #1 on: March 11, 2017, 08:20:38 PM »
You can use FmtTMR to format the time value into a string.

If you would prefer numeric values, you can use two MATH boxes:
For seconds use: MATH SecondVar = (Tmr.Acc / 1000) % 60
For minutes use: MATH MinuteVar = Tmr.Acc / 60000
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ElroyJetson

  • Full Member
  • ***
  • Posts: 36
Re: Displaying timer values in minutes/seconds
« Reply #2 on: March 12, 2017, 10:23:02 AM »
Thanks BobO! both work beautifully, and I learned something along the way!!!!
I ended up using a combination of both to get the displayed string wording exactly as I wanted.
« Last Edit: March 12, 2017, 10:26:56 AM by ElroyJetson »