|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, March 07, 2013 7:20 PM
Points: 15,
Visits: 128
|
|
Refers to issues with SQL Server 2005 Reporting Services (I am not sure if this occurs in the 2008 reincarnation)
Requirement: I would like to display dates in dd-MMM-yyyy format.
Problem: Column used for display in a SSRS report is a datetime. I right-clicked on the relevant text box, selected Properties and then the Format tab, clicked fx and typed the expression =Format (<datetime field from dataset>, "dd-MMM-yyyy").
The above gives months as "Jan", "eb", "3ar", "Apr", "5a10", "Jun", "Jul", "AuA.D.", "Sep", "OcP", "Nov", "Dec".
Cure: DO not use the FORMAT tab of Text box Properties. On right-click of the Text box, click on Expression instead, and enter the expression here, as in: =format(Fields!LastBackupStart.Value, "dd-MMM-yyyy HH:mm:ss")
Seems to work OK. Hope this helps anyone tearing their hair out ....
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 11:28 PM
Points: 1,561,
Visits: 6,105
|
|
You are using the wrong expression for the format. Given a date of 2/3/2009, your expression
=Format (<datetime field from dataset>, "dd-MMM-yyyy").
evaluates to "3-Feb-2009" which is then used to format the date, which results in 03-2eb-2009.
Simply enter dd-MMM-yyyy in the format textbox or use expression ="dd-MMM-yyyy" will fix the problem.
Peter
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, March 07, 2013 7:20 PM
Points: 15,
Visits: 128
|
|
Thank you for that - you've pointed me in the right direction
|
|
|
|