RDLC报告日期显示错误

时间:2015-04-08 03:01:31

标签: c# asp.net rdlc

嗨我得到了日期字段,需要显示dd-MMM-yyyy,但是通过切换月份和日期显示错误

ASP.NET

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

RLDC报告

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

最终产出:2015年8月4日应该是2015年4月8日

请帮忙。感谢

2 个答案:

答案 0 :(得分:0)

Buddy,请尝试一下。我得到了你需要的输出

<强> = CDATE(字段DOB.Value!)的ToString(&#34; DD-MMM-YYYY&#34)

答案 1 :(得分:0)

您可以使用FormatDateTime方法。 愿这个链接帮助你, stackoverflow.com/questions/9140630

相关问题