Format a date string in javascript

后端 未结 7 1523
误落风尘
误落风尘 2020-12-03 15:26

Hello every i have date field of type string with iso format like this: const date = \"2017-06-10T16:08:00: i want somehow to edit the string in the following format like th

相关标签:
7条回答
  • 2020-12-03 16:24

    I would like to suggest to use moment js find it - http://momentjs.com/docs/

    and use it like

        moment(date.toString()).format("MM/DD/YYYY")
    
    0 讨论(0)
提交回复
热议问题