Convert a date to an integer in YYYYMMDD format in SSRS

 ̄綄美尐妖づ 提交于 2019-12-04 18:34:15

Assuming you have a date parameter called YourDate.

You could use the following expression:

=Cint(Format(Parameters!YourDate.Value, "yyyyMMdd"))

Explanation:

Step 1: Format the date to the yyyyMMdd format:

Format(Parameters!YourDate.Value, "yyyyMMdd")

Step 2: Cast the result as an int:

Cint(<FormattedDate>)

Dry coding here, but try...

=Fields!MyDateColumn.Value.Year * 10000 + Fields!MyDateColumn.Value.Month * 100 + Fields!MyDateColumn.Value.Date

Try the following expression :-

=format(cdate(Parameters!Date.Value),"yyyyMMdd")
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!