1

Possible Duplicate:
Convert a Unix timestamp to time in Javascript

I am getting date in the form of unixtimestamp

ex: 1321367459.0 (Equivalent to Tue, 15 Nov 2011 14:30:59)

I want to convert the time stamp to date format using javascript

using jquery also no problem

Community
  • 1
  • 1
user1049997
  • 1,473
  • 4
  • 14
  • 18

2 Answers2

11
var myDate = new Date(1321367459.0 * 1000);
James
  • 106,638
  • 30
  • 159
  • 173
2

You can get a Date object using : var d = new Date(milliseconds);.