There is a list of dates stored in a table like this. In the Dates column, it calculates and stores the dates between FromDate and ToDate.

I have created a function to merge all the dates and it returns the list of dates as a varchar value like this.

I want to check whether a given date is within that date list or not. I tried, but it doesn't give the required result.