Re: Date question

From: Date: Sun, 02 Mar 2003 06:05:12 +0000
Subject: Re: Date question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137762@lists.php.net to get a copy of this message
sorry, I do not see how that will work. I need a function that will know if "2002-08-29 10:53:09" was 24 hours ago, and if true, "new" will appear. warm regards, Sebastian - [BBR] Gaming Clan http://www.broadbandreports.com ----- Original Message ----- From: "John W. Holmes" <holmes072000@charter.net> To: "'Sebastian'" <sebastian@dslr.net>; "'php list'" <php-general@lists.php.net> Sent: Sunday, March 02, 2003 12:40 AM Subject: RE: [PHP] Date question | | SELECT column - INTERVAL 24 HOUR FROM your_table WHERE ... | | ---John W. Holmes... ----- Original Message ----- From: "John W. Holmes" <holmes072000@charter.net> To: "'Sebastian'" <sebastian@dslr.net>; "'php list'" <php-general@lists.php.net> Sent: Sunday, March 02, 2003 12:40 AM Subject: RE: [PHP] Date question | > I have used strtotime() function in the past, and done this: | > | > if($time >= strtotime('24 hours ago')) { | > $new = "new!"; | > } | > | > with it being in UNIX time stamp .. But now I have a different client | > where | > the time stamp in mysql is formatted like: | > 2002-08-29 10:53:09 | > | > what function would I use in this case, date() ? If so, how would I do | the | > same exact thing?

« previous php.general (#137762) next »