Skip to content
Advertisement

How to retrieve current month in SSRS expression

I want to get current month as default value of a parameter. I’ve come up with (which does not work):

=Month(Now())

Advertisement

Answer

If you want to get the month as an int that goes from 1 to 12, you can use this

SELECT MONTH(GETDATE())

This answer was based on the official documentation that you can see in here – http://technet.microsoft.com/en-us/library/ms187813.aspx

Edit

For reporting services specifically, you can use

MonthName(NOW())

This will return a month name and i believe is the function you’re looking for.

Or, in case you want the month as an integer, try using

Month(TODAY())
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement