简体   繁体   English

SSRS 报告格式日期时间

[英]SSRS Report Formatting Date time

How do I write the vb expression for "mm/yy" of a datetime?如何为日期时间的“mm/yy”编写 vb 表达式?

I've tried this with no success我试过这个但没有成功

=Fields!myValue.Value & Format(Fields!myDateTime.Value,"MM/yy")

It's not clear what your datatypes are.目前尚不清楚您的数据类型是什么。 Assuming myValue is numeric abd myDateTime is a DateTime type then you will probably need to convert the numeric value to a string.假设myValue是数字 abd myDateTime是 DateTime 类型,那么您可能需要将数值转换为字符串。

Something like.就像是。

=CStr(Fields!myValue.Value) & Format(Fields!myDateTime.Value,"MM/yy")

If this does not help, post some sample data, including the datatypes and expected result如果这没有帮助,请发布一些示例数据,包括数据类型和预期结果

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM