I have two column dates start_date
and end_date
in a table. I’d like to find out if for a certain month within the year 2024, a member is subscribed for the identified month.
An example, timeframe is start_date = 9/1/2023
and end_date = 12/31/2024
. For the year 2024
and for month of January 2024
, so between 1/1/2024 and 1/31/2024
, I want to return as a result Jan2024
for this member because january falls within the start_date and end_date, and for the month of February 2024
, so between 2/1/2024 and 2/29/2024
, I want to return as a result Feb2024
. This logic, jan2024, feb2024, mar2024, apr2024
, etc should continue till dec2024. can this be accomplished?
thank you.
1