Follow
Using Dates in IF Valueexpressions

Question

When using an IF expression on a report like the below, how do I use a date in my test potion of the expression?  The below text mode is for a task report.

 valueexpression=IF(ISBLANK({project}.{actualCompletionDate}),"Not Completed",IF({project}.{actualCompletionDate}<'1/1/2017',"true","false"))

valueformat=HTML

Answer

To use dates in your test of an IF expression you will need to use the DATE() expression.

valueexpression=IF(ISBLANK({project}.{actualCompletionDate}),"Not Completed",IF({project}.{actualCompletionDate}<DATE('1/1/2017'),"true","false"))

valueformat=HTML