
March 10th, 2003, 08:25 PM
|
|
Contributing User
|
|
Join Date: Mar 2003
Posts: 133
Time spent in forums: 21 h 18 m 21 sec
Reputation Power: 11
|
|
|
Dates
Hi,
A newbie but making some headway into the basics, I have a problem I'm trying to find the difference between 2 dates in a form:
<script language="JavaScript" type="text/JavaScript">
<!--
<!-- Begin
function calc3() {
numtextfield3 = (document.Form1.textfield1.value -
document.Form1.textfield2.value);
document.Form1.textfield3.value = numtextfield3;
}
// End -->
//-->
</script>
I keep getting an error what I want is if:
textfield1 = 12/03/03 12:05 and
textfield2 = 12/03/03 11:10
I would like textfield3 the differnce between the dates.
Any ideas?
Thanks
Sanj
|