Re: Date question
| From: | Tom Rogers | Date: | Sun, 02 Mar 2003 06:17:48 +0000 |
| Subject: | Re: Date question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137764@lists.php.net to get a copy of this message | ||
Hi,
Sunday, March 2, 2003, 3:39:37 PM, you wrote:
S> Greetings all.
S> I have used strtotime() function in the past, and done this:
if($time >>= strtotime('24 hours ago')) {
S> $new = "new!";
S> }
S> with it being in UNIX time stamp .. But now I have a different client where
S> the time stamp in mysql is formatted like:
S> 2002-08-29 10:53:09
S> what function would I use in this case, date() ? If so, how would I do the
S> same exact thing?
S> thanks.
S> warm regards,
S> Sebastian - [BBR] Gaming Clan
S> http://www.broadbandreports.com
you can do if(strtotime($mysq_timestamp) >= strtotime('24 hours ago')) {
strtotime can take a mysql timestamp directly I think
--
regards,
Tom