News:

  • September 26, 2026, 12:36:34 PM

Login with username, password and session length

Author Topic: Rounding with FmtTMR  (Read 7533 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
Rounding with FmtTMR
« on: February 04, 2022, 10:23:19 AM »
Is there an "easy" way to use FmtTMR without displaying the seconds ( 00s) at the end?  Or do I need to make a FOR/NEXT loop, STRPRINT/FmtTMR to a helper string block, do MATH HelperString0.Length - 4 and STRTRUNC with this number?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: Rounding with FmtTMR
« Reply #1 on: February 04, 2022, 10:44:40 AM »
FmtTMR only goes to seconds (not to minutes), so you do have to do it by hand.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Rounding with FmtTMR
« Reply #2 on: February 04, 2022, 11:01:08 AM »
Fair enough.  I'm looking at another angle here, is there an easy way to go from an integer in seconds, such as 3723, to a string formatted as 1h 2m( 3s)? Or do I need to multiply it by 1000 and then do FmtTMR anyways?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: Rounding with FmtTMR
« Reply #3 on: February 04, 2022, 12:05:41 PM »
Fair enough.  I'm looking at another angle here, is there an easy way to go from an integer in seconds, such as 3723, to a string formatted as 1h 2m( 3s)? Or do I need to multiply it by 1000 and then do FmtTMR anyways?

FmtTMR only works w/millisecond values, so you have to multiply seconds by 1000.