note 33252 deleted from function.date by didou
| From: | didou@php.net | Date: | Fri, 20 Jun 2003 09:11:31 +0000 |
| Subject: | note 33252 deleted from function.date by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-50700@lists.php.net to get a copy of this message | ||
Note Submitter: ng4rrjanbiah@rediffmail.com
----
If you want to just compare any two dates, store them in ISO format (yyyy-mm-dd) and compare with
< or > or == operators.
For example, $date1 = "2003-12-30"; $date2 = "2004-02-15";
if ($date1 < $date2) echo "date1 is less than date2";
Note, $date1 & $date2 are just strings. You can use this logic in MySQL too.
HTH,
R. Rajesh Jeba Anbiah