Click to See Complete Forum and Search --> : DateDiff function


hporto
01-05-2003, 06:46 PM
Is there a DateDiff function for JavaScript. It's a function to determine the amount of months, years, days, etc., between 2 dates. I want to create a function to detemine the number of months between 2 form fields (containing dates) and assign the result to another form field.

Thanks :)
Heather

pyro
01-05-2003, 06:49 PM
As far as I know, there is not "pre-built" function to do this, but you could manually do it by first comairing the year, then the month, etc...