javascript - Comparing date time using javasctipt -


i trying compare 2 dates using javascript,the datetime format given below.here want check date1 > date2.how can achive in javascript.

 var date1='2014-03-25 07:30 am';  var date2='2014-03-25 04:30 pm'; 

use gettime:

 if ((new date(date1).gettime()) > ( new date(date2).gettime())){  } 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -