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.
To calculate the number of days between two dates, you need to subtract the start date from the end date.
To determine the differences between two date values, use the DATEDIFF () function. The DATEDIFF() function is used in this type to compute the number of days, years, or other numbers among two DATE values. The starting and finishing dates of the inquiry are shown below.
To find the difference between two Date values as a number, subtract one from the other like so: date_1 — date_2 to return the difference in days.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With