DATE_ADD sytax
Posted by:
John Dillon
Date: September 02, 2004 12:39PM
SELECT myfield FROM Bookings WHERE date_field<='2004/10/09' && DATE_ADD('2004/10/01',INTERVAL(7 day))>='2004/10/09'
- or if I use MyDateField instead of '2004/10/01' - fails with :
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'day))>='2004/10/09'' at line 1
Can anyone see why? I want to add a variable number of days to a date within the WHERE part of the query.
John
Subject
Written By
Posted
DATE_ADD sytax
September 02, 2004 12:39PM
September 02, 2004 09:46PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.