Arithmetic operations on dates ?
jbv.silences at Club-Internet.fr
Sat Feb 26 05:55:45 EST 2005
What is the best way to make artithmetic
operations on dates ? For instance I have
a list of events stored with the date & time
of occurence, and I'd like to quickly pick
up those that took place during the last 17
hours, or the last 3 days, or the last 7 weeks
or the last 19 months...
I know this can be done with SQL but I don't
want to set up a database just for that...
The best thing I came up with is to convert each
event date into seconds, subtract the amount of
seconds of the interval of time, and then pick up
all items greater than that...
But I have the feeling that computing the interval
in seconds might get tricky when there's a february
29 in it (for instance)...
Any better idea ?
More information about the Use-livecode