Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (7k points)

The following:

new Date(1324339200000).toUTCString()

Outputs:

"Tue, 20 Dec 2011 00:00:00 GMT"

I need it to return Dec 20. Is there a better method I can use besides toUTCString()? I am looking for any way to parse through milliseconds, to return a human-readable date.

1 Answer

0 votes
by (13.1k points)

You can do it by using tostring and Date functions like this:

var date = new Date(1324339200000);

date.toString("MMM dd")

Interested in full stack development? Check out full stack developer course from Intellipaat.

  

Related questions

0 votes
1 answer
asked Apr 1, 2021 in Web Technology by Jake (7k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...