How to calculate number of days by two dates in SSRS formula field

巧了我就是萌 提交于 2019-12-01 20:55:51

问题


I have an SSRS report and I have a table there, in which I have a column named as No. Of Days which are lying between two dates. I am getting those dates (datetime) through datasource but don't know how to calculate number of days between these two dates in a tablix cell formula.


回答1:


The following will get the difference between two dates:

=DateDiff("d","01-Jun-2011","10-Jun-2011")

which results in 9.

In a table cell it will be something like:

=DateDiff("d",YourDataSet.Fields!FirstDate.Value, YourDataSet.Fields!SecondDate.Value)


来源:https://stackoverflow.com/questions/6491471/how-to-calculate-number-of-days-by-two-dates-in-ssrs-formula-field

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