Patrioticcow Patrioticcow - 1 year ago 146
jQuery Question

jquery convert number to date?

i have a json file that returns

in epoch format

i want to convert it to something like this
Thu, 06 May 2010 22:36:27 GMT

any script to do this conversion?

Answer Source
var myObj = $.parseJSON('{"date_created":"1273185387"}'),
    myDate = new Date(1000*myObj.date_created);


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download