List of expression elements / Character string operators |
The USING operator converts date and numeric values to a string, according to a formatting mask.
expr USING format
The USING operator applies a formatting string to the left operand.
The left operand must be a valid date, integer or decimal number. Note that DATETIME and INTERVAL expressions cannot be formatted with the USING operator.
The format string can be any valid string expression using formatting characters as described in Formatting numeric values and Formatting DATE values.
The USING operator has a low order of precedence: if you use operators with a higher precedence, the resulting string might not be what you are expecting.
LET x = a || b USING "format"
will first concatenate a and b, then apply the USING format.
LET x = a || (b USING "format")
MAIN DEFINE d DECIMAL(12,2) LET d = -12345678.91 DISPLAY d USING "$-##,###,##&.&&" DISPLAY TODAY USING "yyyy-mm-dd" END MAIN