Convert date into minutes in JavaScript -
I want to compare two dates which are big in those dates.
var date1 = 2011-9-2; Var date1 = 2011-17-06; Can someone say how can I do this?
You will first need to change the stars in both stars.
var date1 = new date ('2011-09-02'); // yyyy-mm-dd format var date2 = new date ('2011-06-17'); If (date1 & date; date2) {warning ('date1 is greater than date 2'); } Once you see 2 objects in the form of a date object, you can compare them against each other (without the need to convert to milliseconds / minute /?)
Comments
Post a Comment