How to format date
I have a date as "Thursday, 4 Aug 2开发者_StackOverflow011". How do I format it to "yyyy/MM/dd"? I have tried the codes:
var myDate = dateText.toString("yyyy/MM/dd");
myDate = Date.parseExact(myDate, "yyyy/MM/dd")
but none seem to work. Help please.
you may use datejs
here is a post on the subject : http://blog.stevenlevithan.com/archives/date-time-format
you also have this jquery plugin : http://plugins.jquery.com/project/jquery-dateFormat
精彩评论