SDU Tools: Calculate number of days in a month using T-SQL

SDU Tools: Calculate number of days in a month using T-SQL

When I’m working with dates, I often need to calculate how many days there are in a specific date.

So, in our free SDU Tools for developers and DBAs, we added a simple tool that does just that. It’s called DaysInMonth.

It takes one parameter:

@Date date - the date to check

Nothing complex. It takes a date, and returns the number of days in the month that contains that date.

Find out more

You can see it in action in the main image above, and in the video here:

https://youtu.be/BWl2jdNzjJU

Access to SDU Tools is one of the benefits of being an SDU Insider, along with access to our other free tools and eBooks. Please just visit here for more info:

http://sdutools.sqldownunder.com

2019-08-28