Jump to content

Date compare, urgent


chintansshah

Recommended Posts

	var date1 = new Date("18/09/2010");
		var date2 = new Date("01/10/2010");

		var date1Comp = date1.getTime(); // milliseconds
		var date2Comp = date2.getTime();

		if (date1Comp < date2Comp)
		{
		   alert("From date is earlier than To date.");
		   return false;
		}

 

If I used above code to compare then it give me wrong result,.

 

Can anybody help, it's very urgent.

Link to comment
https://forums.phpfreaks.com/topic/218264-date-compare-urgent/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.