diffdays

sims sims at ezpzapps.com
Wed Jul 17 17:59:01 EDT 2002


>You have entered a SHORT date for DateA but then the conversion is 
>done from a LONG date. Change the first convert line to say "from 
>system short date" or "from short date" and it should work fine.
>
>Sarah

I changed it as follows but it still puts 730 days.
7/17/1900  to  7/17/2002  is a bit more days than that.

sims

on mouseUp
   put "7/17/1900" into DateA
   convert DateA from  short 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




More information about the use-livecode mailing list