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

1

2 Answers 2

11
var myDate = new Date(1321367459.0 * 1000);
Sign up to request clarification or add additional context in comments.

2 Comments

What's with the '.0' part? You don't need that in JavaScript.
@kzh, sorry, just copied it from the OP.
2

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.