Skip to content
Advertisement

Why is the output for my datediff expression to return a number of days bracketed?

I have written the following expression to give me the number of days between a date and today.

=IIF(Fields!First_Check_Start_Date.Value = nothing,nothing,datediff("d",Today,Fields!First_Check_Start_Date.Value))

The output is correct but is bracketing the number

ie. (292) instead of 292

Any help as to why this is

Advertisement

Answer

if you are using text box to display your result, check what is the type of your text box. Make it as number and look for it’s format and set to correct

enter image description here

Else you could also format like below

=IIF(Fields!First_Check_Start_Date.Value = nothing,nothing,Format(datediff("d",Today,Fields!First_Check_Start_Date.Value),"##"))
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement