在JQuery中将日期转换为dd / MM / yyyy格式 [英] Convert date into dd/MM/yyyy format in JQuery
本文介绍了在JQuery中将日期转换为dd / MM / yyyy格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在选择日期,如 2010年10月14日00:00:00 GMT 0530(印度标准时间)
格式。我想在 dd / MM / yyyy
格式中转换。在jQuery中需要做些什么?
I am getting selected date as in Thu Oct 14 2010 00:00:00 GMT 0530 (India Standard Time)
format. I want to convert this in dd/MM/yyyy
format. What have to do in jQuery?
推荐答案
如果你想要更强大的日期格式化,你可以使用由 Steven Levithan here
if you want more powerfull date formatting, you can use date format function written by Steven Levithan here
var date = dateFormat(new Date("Thu Oct 14 2010 00:00:00 GMT 0530 (India Standard Time)"), 'dd/mm/yyyy');
这篇关于在JQuery中将日期转换为dd / MM / yyyy格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文