How to get the current month name in SSRS?

I need to specify the current month name as the default name in my ssrs report. How to get current month name using ssrs expression?

For example, "09/27/2012" will become "September"
and I need one more ....

09/27/2012 to the name last month (August)

+8
reporting-services
source share
4 answers

First question:

=MonthName(Month(Fields!datefield.Value)) 

Second question:

 =MonthName(Month(DateAdd("m", -1, Today()))) 

I think the second answer to the question might be something like this, first converting the date to a month, and then subtracting 1 from the value of the month, and then converting it to the name of the month.

Further reading:

OFF: I would change the date format you use to 2012-09-27 , as it works in each setting and should give you peace of mind when converting date formats.

+18
source share

Do not subtract 1 bit / s, this will not work in January. Use this: MonthName (month (DateAdd ("m", -1, CDate (Today))))

+6
source share

As a note, I tried the sentence = MonthName (Month (today ())). What I get is #error for any field the expression was in. However, = MonthName (str (Month (today ()))) worked for me. I am not sure if the MonthName method has changed to require a string or if this is some problem with my program. Just thought that I would post this in case someone else would have the same problem.

+1
source share

For the previous month, I found a universal path: = MonthName (month (CDate (Today ())) - 1, False) for SEPTEMBER (full name of the month) 'OR' = MonthName (month (CDate (Today ())) - 1, True) for SEP (short month name)

0
source share

All Articles