Author: pinky8 | Posted on: 10/15/2009 8:28:42 AM | Views : 274

var date1 = new Date(document.forms.a1.startDate.value);
alert(date1.getDate() + '...' + date1.getDay() + '...' + date1.getMonth() + '...' + date1.getYear());
The startDate field has 10/18/2009 and the alert() gives 18...0...9...2009
Why does getMonth() return 9 instead of 10??
When I type in 101809 in the startDate field, how can I convert it to 10/18/2009?
I google and see example of the format() function. I try date1.format('mm/dd/yyyy') but it gives error.
It doesn't support the format() function.
...

Go to the complete details ...