Format the Datetime in SSRS

  • Hi All,

    I have a parameter Date which I select from the calender it shows in SSRS. Now I need to display this paramater on the top of the report. I used a text box with value in it as the Date paramater. It shows 7/15/2010 12:00:00 AM. But I want to format it as July 15, 2010. Please help me in this formating.

    Thanks

  • Try one of the following:

    1. Right-click on your textbox with the date in it, and go to Properties. In the Format tab, enter this as your format code: MMM-dd-yyyy

    2. Enter this as the expression for your textbox which holds the date: =Format(Fields!DateField.Value, "MMM-dd-yyyy")

    Alter the format as necessary for your needs

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I think the expression may help for u, try this

    =(Monthname(Month(DateAdd(DateInterval.Month,0,cdate(Parameters!P_Week_Ending_Date.Value))))) &" "& (Day(DateAdd(DateInterval.Day,0,cdate(Parameters!P_Week_Ending_Date.Value)))) &","& (Year(DateAdd(DateInterval.Year,0,cdate(Parameters!P_Week_Ending_Date.Value))))

    Result-July/16/2010

    in the above expression Instead of P_Week_Ending_Date put u r parameter filed,then it ll work.cheers

    sank

  • Hi,

    Try this .. This really works

    =MONTHNAME(LEFT(format(now(),"MM-dd-yyyy"),2)) & " " & RIGHT(LEFT(format(now(),"MM-dd-yyyy"),5),2) & ", " & RIGHT(format(now(),"MM-dd-yyyy"),4)

    Regards,
    Gayathri 🙂

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply