开发者

How do I convert DateTime format to ShortDateString in Jquery?

开发者 https://www.devze.com 2023-01-10 22:23 出处:网络
I h开发者_运维百科ave a date that I would like to convert to String format./Date(1281067200000)/ is supposed to be 08/06/2010 12:00:00:00.How do I convert /Date(1281067200000)/ to 8/6/2010?[UPDATED]

I h开发者_运维百科ave a date that I would like to convert to String format. /Date(1281067200000)/ is supposed to be 08/06/2010 12:00:00:00. How do I convert /Date(1281067200000)/ to 8/6/2010?


[UPDATED] Use dateJS:

SO thread

Edit: Try this: http://www.esqsoft.com/javascript_examples/date-to-epoch.htm


What type of string format? You could use yourDate.toString() or yourDate.toLocaleDateString() depending on your use case.

0

精彩评论

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

关注公众号