Economy-x-Talk - Sample Scripts
DaysBetweenDates
subtracts endDate from startDate and returns days note same days return 0
The dates should be in the form ("January 11,1987") or ("1/11/87") The function call will look like this:
DaysBetweenDates("January 11, 1987","March 15, 1987")
or
DaysBetweenDates("1/11/87",
"3/15/87")
This script was copied from the Developer Stack 1.1.
Note that you may have to localize the dates used in the function call! [MS]
function DaysBetweenDates startDate, endDate
convert startDate to seconds
convert endDate to seconds
return ((endDate - startDate)/(60*60*24))
end daysBetweenDates
--
-- Original function provided 12/87 by Dallas E. Weaver, Ph.D.
-- Modified 12/87 by Steve Drazga
--
on calculateDate
return DaysBetweenDates("January 11, 1987","March 15, 1987")
end calculateDate
Keep this extensive resource of tutorials and samples on-line! Support RunRev.info!
| Yes, this script is useful. I make a donation and choose freely how much I want to donate on-line (PayPal). Click here if you want to make a donation in dollars. | This script has not (completely) solved my problem and I want Economy-x-Talk to take care of it. Let me contact you. |
Copyright©2002-2008 by Mark Schonewille, Nijmegen, the Netherlands. This web site is in no way affiliated with Runtime Revolution Ltd., but we do recommend the Revolution development platform.