I need to select fiscal year data
I am using the following query but it is not working
SELECT * FROM TABLE WHERE STR_TO_DATE(date_column ,'%Y-%m-%d') BETWEEN CONCAT(YEAR(CURRENT_DATE)-1,'-04-01') AND CONCAT(YEAR(CURRENT_DATE),'-03-31')
Who can help!
P粉8514014752024-03-20 10:42:16
I am working now. I want to get the current fiscal year.
SELECT * FROM TABLE WHERE STR_TO_DATE(date_column ,'%Y-%m-%d') BETWEEN CONCAT(YEAR(CURRENT_DATE)-0,'-04-01') AND CONCAT(YEAR(CURRENT_DATE) 1,'-03-31')