On Tue, 12 Dec 2000, Aden Burnie wrote:

>     Im trying to write a function that calculates time elapsed (eg
> compare 12/12/2000,6:30:00 to 17/01/2001,12:00:00) , ive done the basic
> conversion of date/time to hours/minutes/seconds elapsed, but i cant
> figure out how to turn say "777:45:03"  back into weeks / days / hours /
> minutes / seconds elapsed.

How about something like this:

a: to-time "777:45:03"
weeks: to-integer a/hour / (24 * 7)
a: a/hour: a/hour - (weeks * 24 * 7)
days: to-integer a/hour / 24
a: a/hour: a/hour - (days * 24)
print rejoin ["Time elapsed: " weeks " weeks, " days " days, " a]

Regards,
Kev

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to