I want to count the number of days between some past date and today.
I tried this (using Rev 3.0):
on mouseUp
put "March 12, 2012" into a
convert a to seconds -- LC should understand this as midnight
get the date
convert it to seconds -- should also be midnight
put (it - a)/(24*3600) -- elapsed seconds divided by seconds per day
end mouseUp
This yields "57", which seems right.
But if I change the first line to
put "March 11, 2012" into a
the result is not an integer:
57.958333
Why would that be?
David Epstein
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode