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.
Syed Shareef AhmedSenior System AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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: 

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.
Syed Shareef AhmedSenior System AnalystAuthor Commented:

Thanks for suggestion, when I change the expression I receive any error, please find attached of screen shots.
No problem, Syed.

I'm assuming you've tested your RIGHT(), LEFT(), and MID() logic--you've verified that they are returning the data that you want. That being the case, the DATEDIFF() function expects date values, so I would *NOT* use the FORMAT() function at all.  I would try simply passing the result of your CDATE() functions to DATEDIFF().

Does that make sense?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.