Saturday, October 5, 2013

Date Giving Me #Error No Matter How I Try to Format It :-(

Hi Puffster,


Instead of writing the custom function, why can't you use direct Isdate function in ssrs and write an expression like this :



=IIF(IsDate(Fields!YourField.Value)= True,"Yes","No")



I can see only once problem in you code is you are passing the input parameter as datetime ( Here: FormatDate(dt as datetime)) , instead it should be type of string or object. But i am not sure that's the problem.


Function will fail if you try to assign a non date parameter to the dt and it will throw an exception, hence causing an exception or error and stop working.




Regards Harsh


No comments:

Post a Comment