Friday, February 17, 2012

DateDiff + Where am I going wrong?

Hi,

I'm creating a sample report in Visual Studio 2005 to be used in SSRS 2005.

I'm attempting to do some conditional formatting like so:

=IIF(DateDiff("Day", Fields!Jobseeker.Last Interview.Value, NOW()) > 14, "Red", "Transparent"

When ever I try and preview the report, VS throws a wobblie and closes down. The format of the Last Interview column is dd/mm/yyyy.

Any suggestions

Thanks, Steve

Hi, Steve,

Use VB parameters to DateDiff - ... try 'd' instead of "Day".

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctdatediff.asp

Also verify that the "Last Interview" field name has an underscore "Last_Interview" - that should have happened automatically when you created a dataset from the query.

_

This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment