I'm working on SSRS
reports
there is on column i.e Holding
period
where we actually calculate for
how many days the company is hold in our database (we compare with buy date)
and ssrs expression is
=DateDiff(DateInterval.Day, Fields!BuyDate.Value, First(Fields!Date.Value,"DailyPosition"))
Which is coming wrong could any one help to execute correct calulation.
Buy
date
is a normal date column from table , and "DailyPosition"
is
my dataset name from ssrs report.
for example Company ABC buy date is 2012-03-13
00:00:00.000
and last parameter date is 2012-12-31 00:00:00.000
below query giving me result as 293
select
DATEDIFF (day,'2012-03-13 00:00:00.000','2012-12-31 00:00:00.000')
which is wrong as my holding period is 126
days
only
please help me to correct the expression.
Ashish Fugat (ashuthinksatgmail.com) SE