elyasn Posted March 6, 2008 Share Posted March 6, 2008 i am trying to display records that are less then 30 days old. i used DATE_SUB(CURDATE(),INTERVAL 30 DAY) but poroblem with date_ sub is it will show the futre dates too. i want to be able to only dispaly dates for the past 30 days. is there a way i can achive this with timstamp? Quote Link to comment Share on other sites More sharing options...
beebum Posted March 6, 2008 Share Posted March 6, 2008 ...WHERE date BETWEEN (DATE_DUB(CURDATE(), INTERVAL 30 DAY)) AND CURDATE(); 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.