WEL COME...Tamilnet Live...தமிழ்நெட் லைவ் ..வருக வருக ...

Select Your Language

Compare Two Dates in javascript


  
var firstDate=new Date();
firstDate.setFullYear(start[0],(start[1] - 1 ),start[2]);
var secondDate=new Date();
secondDate.setFullYear(end[0],(end[1] - 1 ),end[2]);
if(firstDate > secondDate)
{
alert("first date is greater");
}
else
{
alert("second date is greater");
}

No comments: