Format (format)

The Format property controls the output of a numeric or date display.

In the Properties view, this property is the Format property in the Value category.

Type: String.

Valid values and defaults depend on the data type (see sections below).

Numeric

Decimal Format Boxes display numeric data.

Pivot Table Hierarchies and Pivot Table Measures display numeric data if Numeric Column is TRUE.

The value must consist of formatting symbols, as in Table 1. For example, "###.##" produces three places to the left of the decimal point and exactly two to the right.

Table 1. Formatting symbols for numeric data
Character Description
* Represents a digit. Fills with asterisks any position that would otherwise be blank.
& Represents a digit. Fills with zeros any position that would otherwise be blank.
# Represents a digit. If no digit is to be displayed at that position, the # is replaced by a blank.
< Causes left alignment.
, (comma) Defines the position of the thousands separator. The thousands separator is not displayed if there are no digits to the left.
. (period) Defines the position of the decimal separator. Only a single decimal separator may be specified.
- Displays a minus sign for negative numbers.
( Displayed as left parentheses for negative numbers (accounting parentheses).
) Displayed as right parentheses for negative numbers (accounting parentheses).

Default value: ---,---,--&.&&

Date

Date Format Boxes display dates.

The value must consist of formatting symbols, as in Table 2, and separating values such as "/". The formatting symbols can use either uppercase or lowercase letters. For example, "YYYY-MM-DD".

Table 2. Formatting Symbols for Dates
Character Description
dd Day of the month as a two-digit integer.
ddd Three-letter English-language abbreviation of the day of the week, for example, Mon, Tue.
mm Month as a two-digit integer.
mmm Three-letter English-language abbreviation of the month, for example, Jan, Feb.
yy Year, as a two-digit integer representing the two trailing digits.
yyyy Year as a four-digit number.

Default value: If Format is not specified, the format is determined by the DBDATE environment variable. If DBDATE is not set, the default format dd/mm/yyyy is used.

For more details, refer to Formatting DATE values in the Genero Business Development Language User Guide.