0

Dipping my toe into the world of reporting. I'm using Report Builder 3.0 and what I'm trying to do seems really easy, but I can't get it to work... I've got 2 datetime2 columns StartDate and EndDate and I want I'm trying to do is work out how many days are between them and if it more than 100 then display true otherwise display false. I've tried:

=IIF(DateDiff("Day",Fields!StartDate.value,Fields!EndDate.value)>100,True, False)

Or

=IIF(Fields!EndDate.value - Fields!StartDate.value > 100, True, False)

Even just getting it to return the number of days:

=DateDiff("Day",Fields!StartDate.value,Fields!EndDate.value)

And all 3 of them give me #Error. Does anyone have a clue where I'm going wrong or how to fix it?

Unihedron
  • 10,902
  • 13
  • 62
  • 72
denimknight
  • 301
  • 2
  • 9
  • 22

1 Answers1

0

I was being stupid and have worked it out... The expression should have looked like this:

=IIF(DateDiff("d",Fields!StartDate.value,Fields!EndDate.value)>1,True,False)
Unihedron
  • 10,902
  • 13
  • 62
  • 72
denimknight
  • 301
  • 2
  • 9
  • 22