[thelist] [MySQL] date_add

Jonathan Snook jonathan.snook at gmail.com
Wed May 23 21:19:24 CDT 2007


> Any ideas why this works in MySQL 5.0.18 and not in 3.23.53-log?
> "SELECT StartDate + INTERVAL 1 MONTH from petition;"

What if you try DATE_ADD?

SELECT DATE_ADD(StartDate, INTERVAL 1 MONTH) AS one_month_later FROM [...]

(s'funny, I'd never think to just use +. I've always used the
date_add/date_sub functions.



More information about the thelist mailing list