Skip to content
Advertisement

SQL select records with current month

I have a field name textbook date field name NewMonth
The data like this

My goal to select the records with current month (2020-04-XX)

My query and not working. Can some one correct my query. Thank you

I think -1 for current month, -2 for last 2 months , -3 for last 3 months andso on

Advertisement

Answer

My goal to select the records with current month (2020-04-XX)

Here is one option:

If you need an upper bound too:

If you want the previous month:

Or two months ago:

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