Forum Discussion
DateDiff with IF statement
- Anonymous9 years ago
Hi Mo-PHAT
Try this
DaysAtPos = IF ([Date to].[date] = 12/31/2099, DATEDIFF ([Date from].[Date] , TODAY(), DAY) ,
DATEDIFF([Date from].[Date],[Date to].[Date],DAY) )
If this works foryou please accept this as solution and also give KUDOS.
Cheers
CheenuSing
Hi Mo-PHAT
Try this
DaysAtPos = IF ([Date to].[date] = 12/31/2099, DATEDIFF ([Date from].[Date] , TODAY(), DAY) ,
DATEDIFF([Date from].[Date],[Date to].[Date],DAY) )
If this works foryou please accept this as solution and also give KUDOS.
Cheers
CheenuSing
- Mo-PHAT9 years agoHelper I
Thank you SO much! I did have to change it slightly to look at the to.year = 2099 but the format worked!! CHAMP