This topic is locked
[SOLVED]

 SQL Date Query

4/7/2010 4:42:05 PM
PHPRunner General questions
J
joevoirol author

I upgraded to 5.2 and I am having problems with an SQL date query. I had the following in the filter:
> curdate()-30
This would return records up to 30 days in the past.
I have tried a couple of different SQL queries but they do not work.
Can someone provide the correct SQL query to get this filter to work?
Thanks

J
joevoirol author 4/13/2010

Thanks Sergey!
Here it is:
> (curdate() - interval 30 day) or you can use interval 1 month