> Okay so I've then got > > 2002-05-08 > and whats then the best way to manipulate it regarding > plus 3 days or plus 4 weeks ?
I definitely agree to use the MySQL format for your dates. It makes it easier to use the built in functions. You can convert the timestamp to a unix style if you have to, also. Read the manual on the date and time functions, there are a ton of them. As for your question, you can do things like that quite easily. SELECT * FROM table WHERE datetime_column BETWEEN CURDATE() AND CURDATE() + INTERVAL 3 DAY; A query like that will select all rows that have a datetime_column value between the current date and three days from now. Substitute DAY for MONTH, YEAR, etc...and it's easy to get whatever you want out of the query. Use DATE_FORMAT() in your query to format the date from YYYY-MM-DD HH:MM:SS to whatever format you want...similar to date() in PHP. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php