function jsDateDiff(strDate1,strDate2){
var theDate1 = Date.parse(strDate1)/1000;
var theDate2 = Date.parse(strDate2)/1000;
var diff=(theDate2-theDate1)/(60*60*24);
return diff;
}
document.write("Date Diff = "+jsDateDiff("document.formnew.input1.value","document.formnew.input2.value")+"<br>");
function jsDateDiff(strDate1,strDate2){
var theDate1 = Date.parse(strDate1)/1000;
var theDate2 = Date.parse(strDate2)/1000;
var diff=(theDate2-theDate1)/(60*60*24);
return diff;
}
document.formnew.input1.value = jsDateDiff('document.formnew.input1.value', 'document.formnew.input2.value');
function jsDateDiff(strDate1,strDate2){
var theDate1 = Date.parse(strDate1)/1000;
var theDate2 = Date.parse(strDate2)/1000;
var diff=(theDate2-theDate1)/(60*60*24);
return diff;
}
document.formnew.input3.value = jsDateDiff(document.formnew.input1.value, document.formnew.input2.value);
function jsDateDiff(){
var strDate1 = document.formnew.input1.value
var strDate2 = document.formnew.input2.value
var theDate1 = Date.parse(strDate1)/1000;
var theDate2 = Date.parse(strDate2)/1000;
var diff=(theDate2-theDate1)/(60*60*24);
document.formnew.input3.value = diff
}