L
libsfan01
HI all!
ive need to format the date (variable "tomorrow") in this form to mysql
format yyyy-mm-dd can anyone please show me how to amend my script?
regards
Marc
<script language="javascript">
function showDate(thisObj){
/* create a Date object using the system clock */
today=new Date();
td = today.getDate();
tm = today.getMonth();
ty = today.getFullYear();
tomorrow=new Date(ty,tm,td+1)
/* convert contents to string and place in control */
document.getElementById(thisObj).value=tomorrow;
}
</script>
<body onLoad="showDate('date');">
<input id="date" type="text" readonly="readonly" />
</body>
ive need to format the date (variable "tomorrow") in this form to mysql
format yyyy-mm-dd can anyone please show me how to amend my script?
regards
Marc
<script language="javascript">
function showDate(thisObj){
/* create a Date object using the system clock */
today=new Date();
td = today.getDate();
tm = today.getMonth();
ty = today.getFullYear();
tomorrow=new Date(ty,tm,td+1)
/* convert contents to string and place in control */
document.getElementById(thisObj).value=tomorrow;
}
</script>
<body onLoad="showDate('date');">
<input id="date" type="text" readonly="readonly" />
</body>