miz_luvly@hotmail.com Posted May 29, 2007 Share Posted May 29, 2007 i need help to build a SQL query/statement to select only records with a date from now and 1 month before and also from now and two months before? is going to be something like: select * from table where month(date_of_entry )= month(now(-2)) thanks in advance Quote Link to comment Share on other sites More sharing options...
Wildbug Posted May 29, 2007 Share Posted May 29, 2007 SELECT * FROM table WHERE date_of_entry BETWEEN NOW () - INTERVAL 2 MONTH AND NOW(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.