I need to be able to convert 6-2-04 into 06-02-2004, right now it's being converted to 06-02-1904.. I need to add like.. 1000 years.. heh! what can I do to make it see 99 as 1999 but 04 as 2004?
Code is below:
function checkForDate(strPassed) {
var newDate = new Date();
newDate.setTime(Date.parse(strPassed.value));
strPassed.value=newDate.getMonth() + 1 + "-" + newDate.getDate()+ "-" + newDate.getFullYear();
}
Code is below:
function checkForDate(strPassed) {
var newDate = new Date();
newDate.setTime(Date.parse(strPassed.value));
strPassed.value=newDate.getMonth() + 1 + "-" + newDate.getDate()+ "-" + newDate.getFullYear();
}