Sudhir Sudhir - 1 year ago 112
AngularJS Question

invalid date format in javascript

I am getting invalid date for one date and other date is working fine, what is the problem in this.

var checkinStartDate=new Date("10/07/2016 09:10:04 AM")
working fine

var checkinEndDate = new Date("10/07/2016 19:10:04 PM")
getting invalid date

Answer Source

It should be like:

var checkinEndDate = new Date("10/07/2016 07:10:04 PM")

19:10:04 PM There are no AM/PM in 24 hr time format

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download