Is it possible to use DateDiff in an IIF statement?
<p>I have searched looking for help but can't find exactly what I need.
I am trying to find the total number of days between two date fields, however the initiating date fields could be from two different fields, eg Start Date, or amended Start Date. The end date will always be the same field.</p>

<p>The majority of the time there will not be an amended start date but I need a way to cater for the scenario that an start date has been amended.
I tried the following </p>

<p><code>=IIF(Fields!AmendedStartDate.Value is nothing, DateDiff("d",Fields!StartDate.Value,Fields!EndDate.Value, DateDiff("d",Fields!AmendedStartDate.Value, Fields!EndDate.Value)))</code></p>

<p>I get an error run a run this.</p>

<p>I am fairly new to Report Builder/SSRS so I am unsure if what I am asking for is even possible.</p>

<p>Thanks for taking the time to look.</p>