seconds to standard time numberformat?

J. Landman Gay jacque at hyperactivesw.com
Fri Aug 22 13:39:01 EDT 2003


On 8/22/03 12:45 PM, Cubist at aol.com wrote:

>    This will give you results like "10:53:12 PM" -- that is, you'll get the 
> hour, minute, second *and* whether it's AM or PM. Of course, your original 
> question didn't mention the AM/PM bit at all; since the "long time" time format 
> automatically includes the AM/PM bit, we must needs find a different way to do 
> it if we don't want to deal with AM/PM. Fortunately, the dateItems time/date 
> format gives you everything you need on a silver platter, or at least in a 
> comma-delimited list whose individual parts you can access thru "item X of 
> TheTime". 

Or even easier, make use of the twelveHourTime property:

set the twelvehourtime to false
get the seconds
convert it to long time
put it

Yields the desired format in military time. No dateItems needed. ;)

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list