Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Rastus81 on March 03, 2013, 01:52:39 AM

Title: Do More Time
Post by: Rastus81 on March 03, 2013, 01:52:39 AM
Hello All,

Ive previously posted my initial question on the AD forum here.
http://forum.automationdirect.com/showthread.php?t=10836 (http://forum.automationdirect.com/showthread.php?t=10836)

But now I've discovered that the string copy does not show double digits for single minute values.

Can anyone suggest how i can display 17.04, instead of 17.4

Im just trying to display a captured time.

Thanks
Rastus

Title: Re: Do More Time
Post by: b_carlton on March 03, 2013, 10:37:10 AM
In the 'help' fro the STRPRINT function click the 'Help Reference for the String Scripting language'. There check out 'zeropad' under 'Number Formatting Functions'. It looks like 'FmtInt(SDT0.Minute,dec,2,zeropad)' instead of just 'SDT0.Minute' should give you what you want.
Title: Re: Do More Time
Post by: Rastus81 on March 03, 2013, 09:18:29 PM
Thankyou, that works great.

I didn't know there were so many string handling options! Wow.
Title: Re: Do More Time
Post by: franji1 on March 04, 2013, 08:45:40 AM
I didn't know there were so many string handling options! Wow.
Hence, the name.  ;D
Title: Re: Do More Time
Post by: Rastus81 on March 04, 2013, 09:36:46 AM
Hence, the name.  ;D

Yeah yeah...
Title: Re: Do More Time
Post by: BobO on March 04, 2013, 10:17:23 AM
Well to be completely honest, it was this capable when it was called something else, but the attorneys had contrary opinions. ::) But hey, it does do more, no?

Glad it was able to give you what you want.