开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜