Number, Size, Date, and Time Formatting
• These patterns are based on the Java classes
SimpleDateFormat and
NumberFormat. Note that the Date Formatter is no longer supported in the SQL Template Designer because the format of the date is controlled by the user’s profile.
• For special cases where custom date formatting is required, use the Oracle TO_CHAR function in the query. This function converts a date or interval value to a character data type in the specified format: Date, Timestamp.
• Negative values - Since the number format is based on Java formatters, you can use a semi-colon (;) sub-pattern boundary to represent negative numbers so that they stand out differently from positive values. See
Examples of Negative Value Formatting.
• For additional details about Java decimal formatters, see
DecimalFormat.
Examples of Negative Value Formatting
The following examples show how to use the semi-colon to represent the negative value, -1234.56.
• #,##0.00;(#,##0.00) displays the value, -1234.56, as (1,234.56)
• #,##0.00;'<font color=red>'(#,##0.00) displays the value, -1234.56, in red as (1,234.56)