diffdays
sims
sims at ezpzapps.com
Wed Jul 17 00:37:01 EDT 2002
What is the best way if the date is much earlier?
If I do the following, I get only 730 days:
on mouseUp
put "7/17/1900" into DateA
convert DateA from system long date to seconds
put "7/17/2002" into DateB
convert DateB from short date to seconds
put DateA - DateB into diff
divide diff by 86400 -- No of seconds in 1 day
if char 1 of diff = "-" then delete char 1 of diff
put diff
end mouseUp
sims
>
>on mouseUp
> put "dinsdag, 9 juli 2002" into DateA
> convert DateA from system long date to seconds
> put "7/17/02" into DateB
> convert DateB from short date to seconds
> put DateA - DateB into diff
> divide diff by 86400 -- No of seconds in 1 day
> if char 1 of diff = "-" then delete char 1 of diff
> put diff
>end mouseUp
More information about the use-livecode
mailing list