Formatting Column of Times
Alex Tweedly
alex at tweedly.net
Tue Sep 6 18:54:04 EDT 2005
Stephen Barncard wrote:
> Hi everyone,
> is there a way to use the format function to make timings line up
> right-justified? -- i.e. pad with leading zeros and/or spaces? Or do I
> have to roll my own? I've been faking this for years but if there's a
> function...
>
What are you starting with ?
If it's tHours and tMins, then you'd do
format("%2d:%02d", tHours, tMins) -- " 3:55"
or
format("%02d:%02d", tHours, tMins) -- "03:05"
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.18/90 - Release Date: 05/09/2005
More information about the use-livecode
mailing list