How to check if one DateTime is later than another in javascript

前端 未结 7 818
隐瞒了意图╮
隐瞒了意图╮ 2020-12-06 04:57

Through the form i am getting two values like

   Start datetime = \'01/12/2013 12:00:00 AM\' and
   End datetime = \'02/12/2013 12:00:00 AM\'.
相关标签:
7条回答
  • 2020-12-06 05:43

    use the date object

        Date1 = new Date('01/12/2013 12:00:00 AM');
        Date2 = new Date('02/12/2013 12:00:00 AM');
        Date1-Date2//in millisecond
    
    0 讨论(0)
提交回复
热议问题