How to get data one year before till now from database in mysql?
0 2592
Answer: To select all records one year ago till today, first of all you have to get the current date for comparing the year with date in your database.
SELECT * FROM users WHERE join_date >= DATE_SUB(NOW(),INTERVAL 1 YEAR);
![Best Web Hosting Best WordPress Hosting](https://bluehost-cdn.com/media/partner/images/codingtag/728x90/728x90BW.png)
Share:
Comments
Waiting for your comments