How to display a Date object in a specific format using JavaScript?

后端 未结 7 1482
不思量自难忘°
不思量自难忘° 2020-12-03 21:21

I have a Date object and I\'d like to display it in the below format:

var myDate = getDate();
// this format: \"13 Jan 2012 11:00am\";

How

7条回答
  •  孤街浪徒
    2020-12-03 22:00

    Have a look at the Date() object : https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date

    There are lots of useful methods ....

提交回复
热议问题