alert(dateObj)
gives Wed Dec 30 2009 00:00:00 GMT+0800
How to get date in format 2009/12/30
?
alert(dateObj)
gives Wed Dec 30 2009 00:00:00 GMT+0800
How to get date in format 2009/12/30
?
Nice formatting add-in: http://blog.stevenlevithan.com/archives/date-time-format.
With that you could write:
var now = new Date();
now.format("yyyy/mm/dd");
Use the Date get methods.
http://www.tizag.com/javascriptT/javascriptdate.php
http://www.htmlgoodies.com/beyond/javascript/article.php/3470841
var dateobj= new Date()
var month = dateobj.getMonth()
var day = dateobj.getDate()
var year = dateobj.getFullYear()
document.write(month + "/" + day + "/" + year)
var month = dateObj.getUTCMonth();
var day = dateObj.getUTCDay();
var year = dateObj.getUTCFullYear();
newdate = year + "/" + month + "/" + day;
or you can set new date and give the above values