performing date calcs

Roger.E.Eller at sealedair.com Roger.E.Eller at sealedair.com
Mon Jan 6 10:10:01 EST 2003


Steve,

Try this...

on mouseUp
  put <beginning_date> into theStart
  put <ending_date> into theStop
  convert theStart to seconds
  convert theStop to seconds
  set the numberFormat to 0.00
  put (theStop-theStart) into theDif
  put (theDif/60)/60 into theHrs
  put (theHrs/24) into theDays
  answer theStop&"-"&theStart&"="&theDif&RETURN&theHrs&&"Hours"
&RETURN&theDays&&"Days"
end mouseUp

Roger Eller
roger.e.eller at sealedair.com

> how to do date calculations. I want to be able to determine the number of
> days a stack has been used by subtracting the start date from the current
> date.  Any help would be much appreciated.
>
> Thanks
>
> Steve
>
> Stephen R. Messimer







More information about the use-livecode mailing list