Using MySQL
ID Date
001 2010-08-01
002 2010-08-15
003 2010-08-22
...
....
Query
select ID, Date from table where date < curdate + 7;
The above query is not working, it showing error.
How to get date upto nextweek date, I don’t want to mentioned the date, it should calculate the systemdate + 7 days.
For Example
Today is 2010-06-30,
So it should take a value upto 2010-07-06
How to make a query for this condition….?
Using the
DATE_ADD()function:using an operator:
reference on date_add
I’m assuming that by
curdate, you mean the function and not a column name. If it’s a column name, change accordingly (although I wouldn’t name a column after an existing mySQL function.)