如何删除时间并仅在 RDLC 中显示日期 [英] How to remove the time and Display the Date only in RDLC

查看:33
本文介绍了如何删除时间并仅在 RDLC 中显示日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Winform(C#) 和 RDLC MySQL.我尝试只在 Tablex 中显示日期.

all I am using Winform(C#) and RDLC MySQL. In that I try to show the date only in Tablex.

但是这种日期格式也有时间.如何去除时间.

But this date format have time also. How to remove the time.

我的表达是,..

=Fields!date.Value

在下面查看我的报告.

提前致谢?

我在表达式中尝试 =Fields!date.Value.ToString("dd/MM/yyyy") 但它通过错误,..错误 1 ​​验证时发生错误.HRESULT = '8000000A'

I am tried =Fields!date.Value.ToString("dd/MM/yyyy") in expression But It through error,.. Error 1 An error occurred while validating. HRESULT = '8000000A'

推荐答案

您可以使用 FormatDateTime 方法:

=FormatDateTime(Fields!date.Value, DateFormat.ShortDate)

或者您可以在属性窗口中设置格式:

Or you can set the formatting in the properties window:

这篇关于如何删除时间并仅在 RDLC 中显示日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆