The date formats do not seem to work in SSRS

2019-08-29 14:21发布

I am wanting to create a report which contains a table with dates.

The format property for the AnnualLeaveDate textbox I am using is;

=FORMAT(Fields!AnnualLeaveDate.Value, "ddd d MMMM yyyy")

So I want a date like Mon 4 August 2011

What I am getting is this;

Annual Leave Date

Tue 15 Nove0ber 2011

We16 16 Nove0ber 2011

T12u 17 Nove0ber 2011

ri 18 Nove0ber 2011

11on 21 Nove0ber 2011


Why is this happening and how can I fix it? I am using SSRS 2008.

1条回答
仙女界的扛把子
2楼-- · 2019-08-29 14:45

Try wrapping the date field in a "Cdate" function as in:

=FORMAT(Cdate(Fields!AnnualLeaveDate.Value), "ddd d MMMM yyyy")

or

wrap the date field in the Cdate function (assignment expression) and then use the date formmating on the dialog display like you would any other data field.

=Cdate(Fields!AnnualLeaveDate.Value) 
查看更多
登录 后发表回答