News:

  • October 18, 2026, 07:49:54 PM

Login with username, password and session length

Author Topic: STRPRINT Script Formatting Request  (Read 9871 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
STRPRINT Script Formatting Request
« on: January 22, 2021, 01:09:45 PM »
Would it be possible to add some more options to STRPRINT's Format String Function?  FmtTMR for an Element stored as seconds, formatted as 1h 59m 59s.  How about FmtDate or FmtTime straight out of a timestamp?  Similar to the options given for Display Foramt on UDT fields.  I'm trying to avoid doing extra math, Seconds x 1000, EPOCH2DT, etc into a helper element just to do a STRPRINT.

I really like the new STRPRINT box's functionality.  Makes things much easier to follow, edit, tweak, etc.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: STRPRINT Script Formatting Request
« Reply #1 on: February 03, 2021, 10:31:52 PM »
I have found a bug in the STRPRINT's FmtTMR function.  See attached screenshot of results.  If the source number is negative, the "Smart" option is not showing all the significant time periods.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: STRPRINT Script Formatting Request
« Reply #2 on: February 04, 2021, 12:11:48 AM »
I have found a bug in the STRPRINT's FmtTMR function.  See attached screenshot of results.  If the source number is negative, the "Smart" option is not showing all the significant time periods.

I guess the bug is in processing a negative value at all. That shouldn?t be supported.
"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

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: STRPRINT Script Formatting Request
« Reply #3 on: February 04, 2021, 12:15:54 AM »
I guess the bug is in processing a negative value at all. That shouldn?t be supported.
Why not? You can have something be 3 hours less than target, or 5 minutes faster than the other, etc?

It would make more sense if it reported the negative symbol one, not for each unit.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: STRPRINT Script Formatting Request
« Reply #4 on: February 04, 2021, 12:21:36 AM »
I guess the bug is in processing a negative value at all. That shouldn?t be supported.
Why not? You can have something be 3 hours less than target, or 5 minutes faster than the other, etc?

It would make more sense if it reported the negative symbol one, not for each unit.

It's intended to render the timer accumulator, which my thinking, was never negative.
« Last Edit: February 04, 2021, 09:35:23 AM by BobO »
"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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: STRPRINT Script Formatting Request
« Reply #5 on: February 04, 2021, 09:35:41 AM »
I guess the bug is in processing a negative value at all. That shouldn?t be supported.
Why not? You can have something be 3 hours less than target, or 5 minutes faster than the other, etc?

It would make more sense if it reported the negative symbol one, not for each unit.

Added.
"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