To Display Month Name and Year instaed of complete date...in SSRS Reports
Hi All, I have a sample data like this..I have added the cases for the particular worker in the table..My question is that when displaying the cases for the particular month...the date should not be displayed..instead of date 2008-04-30 I have to display...like April 2008...if the date is 2008-10-20...it should display as October 2008...can anyone please help me with this... 312 KRISTIWHITE 865400 2008-04-30 2312 KRISTIWHITE 1000264311 2008-04-30 3312 KRISTIWHITE 1000430815 2008-04-30 1312 KRISTIWHITE 1000660614 2008-04-30 1 312 KRISTIWHITE 1002371318 2008-04-30 2312 KRISTI WHITE 2003722520 2008-04-30 4 Thanks Chaitanya.
May 6th, 2008 11:50am

You can apply .NET formatcodes on the Format property of textboxes, or use the Format function directly in an RDL expression, e.g. =Format(Fields!Date.Value, "MMMM yyyy") More info about DateTime format codes is available on MSDN: * http://technet.microsoft.com/en-us/library/aa720651.aspx * http://technet.microsoft.com/en-us/library/aa719856.aspx -- Robert
Free Windows Admin Tool Kit Click here and download it now
May 6th, 2008 12:27pm

Hi Robert, Thanks for your reply...But when I am trying the Format function ehich you gave the date is being diplayed as MMMM YYYY......So, Please help if there is any other alternation...which displays the Month Name.. Thanks Dotnetdev1
May 7th, 2008 9:33am

Use this Format(Parameters!Month1.Value,"M")
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2008 10:37am

The Format function can only format numeric or DateTime values. In your case it seems the Date value is actually returned as a string value from your data source/query. You can try to convert the string to a DateTime object using the CDate() function. For example: =Format(CDate(Fields!A.Value), "MMMM yyyy") -- Robert
May 7th, 2008 12:17pm

hello an alternative you coud try =string,format("{0:MMMM yyyy}",cdate(<your value>))
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2008 12:47pm

=Monthname(Datepart("m", Fields!DATE.Value)) & " " & Datepart("yyyy", Fields!DATE.Value) January 2011 =Monthname(Datepart("m", Fields!ADATE.Value)) & VbCrLf & Datepart("yyyy", Fields!ADATE.Value) January 2011
March 29th, 2012 8:59am

simply use: =Format(Fields!DATE.Value,"MMMM yyyy") no need to deal with the datepart. fyiThink out of the box
Free Windows Admin Tool Kit Click here and download it now
March 29th, 2012 10:08am

FYI .., select getdate() as 'Current DateTime',datename(m,getdate())as 'MonthName',datepart(d,getdate()) as 'Date',datepart(month,getdate()) as 'Month Number',datepart(YY,getdate()) as 'Year',datepart(Hour,getdate()) as 'Hour',datepart(Minute,getdate()) as 'Minute',datepart(S,getdate()) as 'Seconds',datepart(ms,getdate()) as 'MilliSeconds' , datepart(y,getdate()) as 'Julian Dt'
July 14th, 2012 8:29am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics