Skip to content
Advertisement

Query to check if date is between two month-day values

I want to know if a date (Year-Month-Day) is between a day of the month (Month-Day).

For example, I want to know if ‘April 2, 2013’ is between ‘April 2’ and ‘April 19’.

I can easily do this of the range has a year value. Howver, without a year, I need ideas how to do this.

Some examples of what I’m trying to achieve:

Thanks

Advertisement

Answer

You can make use of DATE_FORMAT().

Example

Edit

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement