http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html
That web page has tons of details.
metin
Cole S. Ashcraft wrote:
I am trying to see whether a data in an array pulled from a MySQL DB
(YEARMONTHDATE) is older than 14 days ago. I am trying to do this in
PHP. My code looks like:
if($array['due'] <= $today - 14)
{
echo "<h5>Assignment In Void:</h5><br><h4>Assignments in the void are
read-only";
require('footer.php');
exit;
}.
I am having problems with the math. How do I do a date subtraction
without ending up with something like 20040994 (not a valid date)?
Thanks,
Cole
--
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php