Hi,
I have a table with a column of TIMESTAMP data. I'd like to make a query to get all the records that have a date with the previous month.
I tried:
SELECT * FROM table WHERE month(now()) = month(column)+1 ;
Unfortunately it returns all the records with this month as well. Where is the mistake?
Can anyone help me?
Thanks, Akos
I have a table with a column of TIMESTAMP data. I'd like to make a query to get all the records that have a date with the previous month.
I tried:
SELECT * FROM table WHERE month(now()) = month(column)+1 ;
Unfortunately it returns all the records with this month as well. Where is the mistake?
Can anyone help me?
Thanks, Akos