comparing 2 dates with javascript -


i want compare 2 dates in following format shown below in variables a , b . want check if a greater b code below isnt working since not regular number

var = "4/29/2015"; var b = "4/10/2015";  if(a > b){ alert("working"); } 

convert strings date objects.

var = new date("4/29/2015");  var b = new date("4/10/2015");    if (a > b) {    console.log(a + " greater " + b);  }


Comments

Popular posts from this blog

command line - Use qwinsta in PowerShell ISE -

java - Incorrect order of records in M-M relationship in hibernate -

Python website log in: BIG-IP can not find session information in the request -