Decisions Example 4: Date Calculation

Previous Next

See Also

When a date value taken from a method call (e.g. MyDateColumn.value() or MyTreeView.GetCurrentItemValue(datecol_name)) is used as an argument in a decision (e.g. :myDateColumn), USoft recognizes the conceptual date format as long as the calculation is stated in one SQL statement. The output of the calculation will be in the string format.

The following example works, because the calculation is stated in one statement:

Decision SQL

SELECT    :myDateColumn+3

Yes Action

(:1)

The following example does NOT work to calculate a date format. USoft sees :1+3 as a numeric expression while :1 represents a string value (the output of the retrieved date)

Decision SQL

SELECT    :myDateColumn

Yes Action

(:1 +3)