"Ryan Schefke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > > > I'm pulling a date in the "datetime" format via a MySQL query. Using PHP I > would like to check if that date is prior to today's date. Can someone > please help with this quick question.
You could convert it to a timestamp via strtotime() and check it against time(): $date = strtotime($dateFromDb); if ($date < time()) { echo 'Date is in the past.'; } Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php