[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 527
  • Last Modified:

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.
0
vbasqlprogrammer
Asked:
vbasqlprogrammer
  • 2
1 Solution
 
SThayaCommented:
Hi,

 use the bleow expression

=Day(Fields!sdateplan.Value)&"-"&Left(MonthName(Month(Fields!sdateplan.Value)),3) &"-"&Right(Year(Fields!sdateplan.Value),2)
0
 
itcoupleCommented:
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
0
 
SThayaCommented:
Hi,

 when i place your format code in the custom properties like "dd-MMM-yy".. it working perfectll
. can you send me some data in the Fields!sdateplan.Value  field
0
 
vbasqlprogrammerAuthor Commented:
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.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now