Re: counting with CURDATE() - please help!

From: Date: Sat, 26 Jan 2002 16:15:54 +0000
Subject: Re: counting with CURDATE() - please help!
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-16214@lists.php.net to get a copy of this message
if you have a date column 'birthdate' SELECT (birthdate + INTERVAL 7 MONTH) as birthdate FROM yourtable WHERE ....... Look at the date and time functions in the MySQL manual. -Jason Garber IonZoft.com At 02:28 PM 1/27/2002 +0000, DL Neil wrote:
Hello Sander, I want to add a variable numer of months to the current date CURDATE(). I thought it should be something like this: select (MONTH(CURRENT_DATE)+MONTH(2)) but i get NULL as a result. The purpose of this it to check which records with a experation date is earlier or later than today+2 months later. Can somebody please tell me how to do this? Would MySQL's ADD_DATE() suit? =dn -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.db (#16214) next »