How to compare dates in a report to mark tasks Early, Late, or On Time.
I am trying to compare a custom data field (Requested Delivery Date) to the Actual Completion Date to be able to label tasks Early, Late, or On Time in a report column.
Among the expressions/text blocks I have tried are the following:
displayname=Timing1
textmode=true
valueexpression=IF({actualCompletionDate}={DE:Requested Delivery Date},"On Time",IF({DE:Requested Delivery Date}>{actualCompletionDate},"Early",IF({actualCompletionDate}>{DE:Requested Delivery Date},"Late","")))
valueformat=HTML
displayname=Timing2
textmode=true
valueexpression=IF(WEEKDAYDIFF({DE:Requested Delivery Date},{actualCompletionDate})=0,"On Time",IF({DE:Requested Delivery Date}>{actualCompletionDate},"Early",IF({actualCompletionDate}>{DE:Requested Delivery Date},"Late","")))
valueformat=HTML
Neither worked properly. I could not get On Time to work at all in the first example (I assume this is because of time stamping?), so I tried the second one. And while using WEEKDAYDIFF for the On Time designation worked, both versions had some wrong calculations (eg. Requested 8/6/20 and Actual 7/24/20 calculated to Late instead of early).
I am sure there must be an easy way to do this that I am just missing. Any help would be appreciated.