Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing day name and month name in ssrs

I am having a date example 4/29/2015 . I need to change the format of date like "Wednesday,april 29,2015. How to achieve this using SSRS.?

like image 503
Alias Varghese Avatar asked Apr 29 '15 09:04

Alias Varghese


2 Answers

Your expected format (Wednesday,april 29,2015) is not standard, so you will need the following custom format:

"dddd,MMMM dd,yyyy"

So the date 4/29/2015 will output Wednesday,April 29,2015 which is closer to what you need than the D standard format which will output Wednesday, April 29, 2015.

Now that you have the right format, you need to place it on the report.

There are 2 options:

I am assuming you have a datetime field called YourDate or a string field called YourDateString.

  1. In the Expression:

    • =Format(CDate(Fields!YourDateString.Value), "dddd,MMMM dd,yyyy")
    • =Format(Fields!YourDate.Value, "dddd,MMMM dd,yyyy")
  2. In the report item properties

    • Expression:
      =CDate(Fields!YourDateString.Value) or =Fields!YourDate.Value
    • Text Box Properties => Number => Custom => Custom format:
      dddd,MMMM dd,yyyy
like image 104
Sébastien Sevrin Avatar answered Oct 20 '22 22:10

Sébastien Sevrin


Assuming that your date field is of data type date or datetime (otherwise you will need a cast in your sql query), this is how you can do it:

  • Right click the textbox where your datetime is displayed and choose textbox properties:

enter image description here

  • From the left panel choose Number, then date and choose the desired format:

enter image description here

  • Then you should see the date displayed as:

enter image description here

like image 28
Mahmoud Gamal Avatar answered Oct 20 '22 23:10

Mahmoud Gamal