Avatar of vbasqlprogrammer
vbasqlprogrammer

asked on 

SSRS Displaying Date Incorrectly

Could some on please tell me why a REport I have created is displaying the date incorrectly.  At the moment it seems to only be for certain months.  

For the date format field I have put :  =Format(Fields!sdateplan.Value, "dd-MMM-yy").  But what displays in the report for 01-Feb-2012 is "01-eb-12" And for 01-Mar-2011 is "01-3ar-11"

Could someone please explain what is happening here?

Thanks.
SSRS

Avatar of undefined
Last Comment
vbasqlprogrammer
Avatar of SThaya
SThaya
Flag of India image

Hi,

 use the bleow expression

=Day(Fields!sdateplan.Value)&"-"&Left(MonthName(Month(Fields!sdateplan.Value)),3) &"-"&Right(Year(Fields!sdateplan.Value),2)
Avatar of itcouple
itcouple
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi

Try =Format(Today(), "dd-MMM-yy")

If that works than your field is not in proper format. You might have to cast to date.

Check your sql to ensure it is date. If not you can cast in sql. Below is link to sql queries example and the first one contains some example with date.

SQL Queries Examples

Regards
Emil
ASKER CERTIFIED SOLUTION
Avatar of SThaya
SThaya
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of vbasqlprogrammer
vbasqlprogrammer

ASKER

Hi SThaya,

I put ="dd-MMM-yy" in the format field and it worked fine.  So somewhere along the line it doesn't like the format command for whatever reason.  The field is definately typed as a datetime field on the server, so no problems there, and I even get the problem after casting it as well.  So a wee bit strange.  But however, with this solution it works.

Thanks.
SSRS
SSRS

SQL Server Reporting Services (SSRS) is a server-based report generation software system from Microsoft. It can prepare and deliver a variety of interactive and printed reports and is administered via a web interface or its web service. Its web services interface also supports the development of custom reporting applications. Finally, SSRS can also be integrated with SharePoint. SSRS competes with other business intelligence tools, most prominently Crystal Reports.

10K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo