Javascript - Type Mismatch getthedate

wxdqz

New Member
I am trying to get a date returned to me with the following code. I am passing the function the value 0, so the function can return the first occurrence of the date created within the function.

Thanks

Below is in the had section
-------------------------------------------------------------------
<script language="JavaScript"><!--
function getthedate(dte) {
var now = new Date();
now = new Date(now.getFullYear(),now.getMonth(),now.getDate(),0,0,0); // midnight

var text = '<form><select name=thedates>';
for (i=0; i<2; i++) {
var theDay = new Date(now.getTime()+(i*24*60*60*1000));
If (i == 0 && dte == 0); {
var theDay = new Date(now.getTime()+(i*24*60*60*1000));
dte += (theDay.getMonth()+1) + '/' + theDay.getDate() + '/' + theDay.getFullYear();

return dte;
}
}
}
//--></script>
----------------------------------------------------------------------
Below is in the head section following the function

<%
dim todaydate
todaydate = getthedate(0)
%>
 
Back
Top