On Monday 31 March 2003 18:27, wrote: > I'm trying go get a future date from a query that contains a datetime > column. I figured I would be able to use an alias in the query to > calculate the future date as follows: > > select expires as date_add('date' + interval 180 days) from table; > > 'date' is the column where the datetime is stored in the table. > > I'd really like to be able to do this calculation within my query rather > than pull the value and convert it for use in php.
Please, check the manual how to use DATE_ADD() function. You can find example at: http://www.mysql.com/doc/en/Date_and_time_functions.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]