Forum Discussion
Mo-PHAT
Helper I
9 years agoDateDiff with IF statement
Hi, I have 2 columns of dates and wish to get the days between these dates. Easy done with a datediff. However sometimes the to date will be 31/12/2099 as these are dates in a job so that mea...
- 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
Cockatoo01
2 years agoFrequent Visitor
I'm writing this and getting a scalar error and wondering if there is another way to do this. Please advise, thanks!
Average Day =
IF(tablename, fieldname = "Contractor"),datediff('Out-Processing'[Departure Date], 'Out-Processing'[OPS Chief Signature_], day)