Formatting the date time with Javascript

后端 未结 12 2331
暗喜
暗喜 2020-11-27 07:36

I have a date/time string like 2012-01-13 04:37:20 but I want to convert it to dd-mm-yyyy hh:mm, how can i do this?

I am using the followin

12条回答
  •  粉色の甜心
    2020-11-27 07:47

    The best date-time handling lib in JavaSCript is moment.

    moment().format('MMMM Do YYYY, h:mm:ss a');
    

提交回复
热议问题