How to get Current Year Data in MySQL?
We can use curdate() function to get today’s date and then use year() function on it to get the current year.
SELECT * FROM table_name WHERE date_column= year(curdate());
OR
We can CURRENT_DATE() function
SELECT * FROM table_name WHERE YEAR(date_column) = YEAR(CURRENT_DATE());
The post How to get Current Year Data in MySQL? appeared first on PHPGurukul.