0

Hi I got the date field and need to display dd-MMM-yyyy but it display wrongly by switching the month and day

ASP.NET

  DateTime dt = DateTime.ParseExact("2015-04-08", "yyyy-MM-dd", CultureInfo.InvariantCulture);

RLDC Report

=Format(Cdate(First(Fields!DOB.Value, "SIDocument_iLifeLead")),"dd-MMM-yyyy")

Final Output: 04-Aug-2015 it should be 08-Apr-2015

Please help. Thanks

Ng Mun Keat
  • 11
  • 1
  • 8

2 Answers2

0

Buddy ,please try with this.I got the output as you needed

=CDate(Fields!DOB.Value).ToString("dd-MMM-yyyy")

Jaspher J
  • 29
  • 9
  • Could you please elaborate more your answer adding a little more description about the solution you provide? – abarisone May 15 '15 at 05:43
0

You can use the FormatDateTime method. May this link helps you, stackoverflow.com/questions/9140630

Community
  • 1
  • 1
iTechOwl
  • 150
  • 11