- Open the query in SQ01
- Goto > Field selection > Field Selection 'This is where the column will be added
- Edit > Short names > Switch on/off 'To show the field that will allow you to name the column
- Input names for fields that will be used in the calculation
- Edit > Local field > Create 'create the column
- Input a Short Name, Field Description and Heading
- In Properties, select Calculation field and input the Number of Digits
- In Calculation Formula input the formula
- In Condition, input the condition when the formula will be applied
In the example, %DATE = today's date. It The value to be displayed in the field is today's date minus the date in DISCHPORT. This calculation will only apply if DISCHPORT is not equal to blank. <> is not equal to, and 00/00/000 in date field is blank.