Re: comparing dates
| From: | Philip Hallstrom | Date: | Tue, 20 Sep 2005 18:16:46 +0000 |
| Subject: | Re: comparing dates | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-222797@lists.php.net to get a copy of this message | ||
Is there a quick way to compare dates in the format dd/mm/yy without exploding and comparing the individual parts?Compare them in what way? Before, after, days between? In any case, i'd look at strtotime() to convert them into timestamps, then diff them to get the number of seconds b/n them, then go from there. If strtotime() won't do it because it expects mm/dd/yy (consider 01/02/05 is that feb 1st or jan 2nd?) then split up the string and use mktime(). good luck.