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

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -