Pablo Gûereca
Pablo Gûereca

Reputation: 725

Date format change SSRS

I have a view with a date column with this format : YYYY-MM-DD and I am using that column in a SSRS report but the final user wants to have something like this:

December 31, 2018

I am using this expression:

=FormatDateTime(Parameters!prmReportDate.Value,DateFormat.LongDate)

But I am getting this:

Monday December 31, 2018

I don't need the day. Is there a way to remove it?

Upvotes: 0

Views: 190

Answers (2)

SuperSimmer 44
SuperSimmer 44

Reputation: 999

Try something like this:

=MonthName(Month(Parameters!prmReportDate.Value),false) 
& " " & 
day(Parameters!prmReportDate.Value)
& "," & 
year(Parameters!prmReportDate.Value)

Upvotes: 0

Steve-o169
Steve-o169

Reputation: 2146

You could simply format the textbox as a date and specify the correct format. You'll just need to set the expression in the textbox as:

=Parameters!prmReportDate.Value

And you should be able to set the Number format property as:

image

And this should give you the output you expect. If it doesn't work as expected(which actually seems to be the case as I test it), should be able to apply the following expression:

=Format(Parameters!prmReportDate.Value, "MMMM dd, yyyy")

Just remove one of the ds from the expression to remove a leading zero on single digit dates.

Upvotes: 1

Related Questions