Forums
This topic is locked
Cant get datediff to work
Posted 12 Feb 2012 19:32:48
1
has voted
12 Feb 2012 19:32:48 Chuck Busch posted:
I cannot seem to get datediff to work in my simple function called by pressing a button.It does not return any value for var day_calc.
function date(form) {
d=eval(form.today_date.value);
e=eval(form.closing_date.value);
f=eval(form.day_calc.value);
form.today_date.value='31-Jan-09';
form.closing_date.value='31-Jan-10';
form.day_calc.value = DateDiff("d", '31-Jan-09', '31-Jan-09');
}