Print JavaScript date in ‘MMM dd, yyyy’ format (like ‘Oct 17, 2012’)

  date, datetime, javascript

I am getting a date string in ISO format (for example, ‘2012-10-16T17:57:28.556094Z’), but while printing it in my html page I should print it in ‘MMM dd, yyyy’ format (for example, ‘Oct 17, 2012’).

What is the simplest way to achieve this without using any library?

Thanks.

Source: Ask Javascript Questions

LEAVE A COMMENT