Here is my code:
select date_format(fee_month, '%b-%Y') from bb_fee_info where
date_format(`FEE_MONTH`,'%b-%Y') >= 'Apr-2016'
and date_format(`fee_month`, '%b-%Y') <= 'Apr-2017'
As per my understanding above statement should return from April-2016 to April-2017 but it only returns April-2017 records why is that ?
FYI in my Table fee_month stored as date data type and for example, for April month records all my fee_month will be stored as 2017-04-01.