princessdmb
Registered User.
- Local time
- Today, 09:22
- Joined
- Sep 1, 2011
- Messages
- 15
Hello,
I'm trying to calculate the number of days between two dates using the iif statement
Fields:
[LDW] "Last Day Worked"
[ReturnedDate]
DESCRIPTION:
If ReturnedDate is null, then calculate the datediff "d" between LDW with Now(), if not, then calculate the datediff "d" between LDW with ReturnDate.
Not sure if the Iif function would be the appropriate to use or how to put it together.
I tried this but it didn't work at all. :banghead:
Days Absent: Iif(isnull([ReturnedDate],(DateDiff("d",[LDW],Now())),(DateDiff("d",[LDW],[ReturnedDate])))
Your help will be much appreciated!!!
Thanks
Denise ♥
I'm trying to calculate the number of days between two dates using the iif statement
Fields:
[LDW] "Last Day Worked"
[ReturnedDate]
DESCRIPTION:
If ReturnedDate is null, then calculate the datediff "d" between LDW with Now(), if not, then calculate the datediff "d" between LDW with ReturnDate.
Not sure if the Iif function would be the appropriate to use or how to put it together.
I tried this but it didn't work at all. :banghead:
Days Absent: Iif(isnull([ReturnedDate],(DateDiff("d",[LDW],Now())),(DateDiff("d",[LDW],[ReturnedDate])))
Your help will be much appreciated!!!

Thanks
Denise ♥