Link to home
Start Free TrialLog in
Avatar of Syed Shareef Ahmed
Syed Shareef AhmedFlag for Saudi Arabia

asked on

datediff of ssrs

I have date in number data type, I am using expression as attached.

It shows #Error in the report, I have attached a screen shot of the report which shows #Error in 'Days' column marked with Red Box.

Please guide me if i am wrong.
datediff.jpg
datedifferr.jpg
Avatar of bcnagel
bcnagel
Flag of United States of America image

One quick thing to try would be to substitute DateInterval.Day for your "DAY" value (the value of the first parameter). The DateInterval class is a Visual Basic enumeration class with members that can be seen here:

https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.dateinterval%28v=vs.110%29.aspx 

I've had good success using the members of that class whenever SSRS is looking for an interval in a date function.

Remember not to use quotes around DateInterval.Day.
Avatar of Syed Shareef Ahmed

ASKER

Hi,

Thanks for suggestion, when I change the expression I receive any error, please find attached of screen shots.
datediff-exp-1.jpg
datedifferr-1.jpg
ASKER CERTIFIED SOLUTION
Avatar of bcnagel
bcnagel
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial