G
Guest
I am struggling with the development of a formula that calculates the no of
days between two dates that are both selected as a result of IIF statements.
The formula I have written is:
=(IIf([End Date] Is Null Or [End Date]>=[Period End Date],[Period End
Date],[End Date]))-(IIf([Start Date]<[Period Start Date],[Period Start
Date],[Start Date]))
[End Date] and [Start Date] are fields in a table. [Period End Date] and
[Period Start Date] are entered by the user when the query is run.
The formula works correctly when Both (i) End Date is not blank and is
ealier than the Period End Date and (ii) when Start Date is later than
Period Start Date but not under any other circumstances.
Any advice would be gratefully received.
Thanks
days between two dates that are both selected as a result of IIF statements.
The formula I have written is:
=(IIf([End Date] Is Null Or [End Date]>=[Period End Date],[Period End
Date],[End Date]))-(IIf([Start Date]<[Period Start Date],[Period Start
Date],[Start Date]))
[End Date] and [Start Date] are fields in a table. [Period End Date] and
[Period Start Date] are entered by the user when the query is run.
The formula works correctly when Both (i) End Date is not blank and is
ealier than the Period End Date and (ii) when Start Date is later than
Period Start Date but not under any other circumstances.
Any advice would be gratefully received.
Thanks