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,553
  • 4
  • 14
  • 18

2 Answers2

11
var myDate = new Date(1321367459.0 * 1000);
James
  • 109,676
  • 31
  • 162
  • 175
2

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