John Taylor-Johnston wrote:
I have a field 'updated' How can I tell if the date is older than 1 year ago (or should I think of 365 days)?

`updated` date NOT NULL default '1999-12-12'

From the description you gave it looks like you're using a DBMS to store the date. If it's MySQL, then just do an SQL query with a WHERE clause like this:

WHERE updated > DATE_SUB(NOW(), INTERVAL 1 YEAR)

Jasper

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to