AngularJS/javascript converting a date String to date object

后端 未结 4 1121
终归单人心
终归单人心 2020-12-09 15:56

Im stuck on a problem and would appreciate any help. I have read through lot of the discussions already but they dont seem to work for me.

//I have a date a         


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-09 16:19

    I know this is in the above answers, but my point is that I think all you need is

    new Date(collectionDate);
    

    if your goal is to convert a date string into a date (as per the OP "How do I convert it to a date object?").

提交回复
热议问题