Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 694
asma Avatar asked Jun 27 '11 10:06

asma


People also ask

How do I calculate the number of days between two dates?

To calculate the number of days between two dates, you need to subtract the start date from the end date.

How do you find the difference between two dates in SSRS?

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.

What is the formula to calculate the number of days between two dates in Salesforce?

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.


1 Answers

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)
like image 120
Damien Dennehy Avatar answered Sep 17 '22 16:09

Damien Dennehy