convert time format in db to jquery countdown format

I have field in db contain date in the format '2012-09-21 09:25:00' I am doing a jquery

countdown function but there I need the date format in 'Fri Sep 21 2012 09:25:00 GMT+0530 (India Standard Time)'

so how to covert '2012-09-21 09:25:00' to 'Fri Sep 21 2012 09:25:00 GMT+0530 (India Standard Time)'

using jquery


Click the link below for the solution of your problem. Hope this helps :)

How to convert a time format that I got from PHP to a format that jQuery countdown accepts


You can try sending the date in ISO format.

This piece of code can help you

$iso_date = date('c', strtotime('2012-09-21 09:25:00'));

Hope that helps you.

链接地址: http://www.djcxy.com/p/77506.html

上一篇: 在JavaScript中将日期转换为JSON的问题

下一篇: 在db中将时间格式转换为jquery倒数格式