Format (format)

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

Type: String.

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

You can find the Format property in the Value category of the Properties view.

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. The formatting uses the values of the DBFORMAT and DBMONEY environment variables.

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. By default, the thousands separator is a comma, but it can be another character as defined by DBFORMAT.
. (period) Defines the position of the decimal separator. Only a single decimal separator may be specified. By default, the decimal separator is a period, however it can be another character as defined by DBMONEY or DBFORMAT.
- Displays a minus sign for negative numbers.
$ This is the placeholder for the front specification of DBMONEY or DBFORMAT.
( 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.