Answers for "how to convert string into date js and compare"

1

string compare on date in js

var d1 = Date.parse("2012-11-01");
var d2 = Date.parse("2012-11-04");
if (d1 < d2) {
    alert ("Error!");
}
Posted by: Guest on June-07-2020

Code answers related to "how to convert string into date js and compare"

Code answers related to "Javascript"

Browse Popular Code Answers by Language