Hi there,
Can some one help me with the following problem. I need to pass the date to 2000-02-02 date format so that mysql will accept it. The following code is as follows;
function checkdate() {
var begDate = new Date(document.demoform.now.value);
var endDate = new Date(document.demoform.later.value);
var difDate = endDate.getTime() - begDate.getTime();
var days = difDate / (24*60*60*1000);
alert(days);
}
Can someone please help me with how to do this so that I get the 2000-01-01 date partern?
Your help will be really apprecaiated