I would say that the CURDATE is converted to an integer because of +0. Since if you add 1 to a date, should that increment years/months/days/ or seconds ?
Use the DATE_ADD(date,INTERVAL expr type) functions instead. cheers mike -----Original Message----- From: Alan Williamson [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 March 2004 9:47 PM To: [EMAIL PROTECTED] Subject: CURDATE() bug? Could anyone tell me if this is a bug or not. SQL: SELECT CURDATE()+0; RESULT: 20040331 Thats good. However consider this: SQL: SELECT CURDATE()+1; RESULT: 20040332 Not so good. Infact with this version any WHERE clauses you would put this in, fails to bring back the right result. Does CURDATE() support numeric addition like this? Or is the "+0" purely a casting-hack to get the right format. Its not meant as pure addition. Thoughts? thanks alan -- Alan Williamson, City Planner w: http://www.BLOG-CITY.com/ e: [EMAIL PROTECTED] b: http://alan.blog-city.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]