Previous Topic

Book Contents

Book Index

Next Topic

Subtab - Format

It is also possible to define a format depending on an attribute type. It means that different types of certain attributes (typically numbers and dates, such as Number, BigDecimal, Integer, Timestamp etc.) can be individually formatted. For instance, you can define that all numbers would be given two decimal places or that all numbers would not have a thousand separator or that all dates would have mm/dd/yyyy format only.

On the Format tab, there are the following options:

  • Pattern

    You can define your own pattern using specific pattern symbols: Start with selecting a predefined format, switch to the 'Pattern' radio button and edit/modify the format as needed. Watch the example field which reflects the modified pattern. If the pattern is illegal, it won't be stored.

    Help Image

    Note that unlike the predefined format, for dates and times the pattern is fixed and doesn't reflect the language itself (e.g. dd.MM.yy will always show first the day, then month, then year, separated by . in any language).

     

    Explanation of the pattern symbols (Number):

 

#

Digit (shown only if present).

 

0

Digit (the zero = absent).

 

.

Decimal separator used for the mask definition (as seen by the consultant).

The separator symbol used in the resulting formatted value (i.e. seen by the user) depends on the selected GUI language. For example, a decimal point will be used in English and a comma in German.

 

,

Grouping separator used for the mask definition (as seen by the consultant).

The symbol used in the resulting formatted value (i.e. seen by the user) depends on the selected GUI language. For example, a comma will be used in English and a dot in German.

 

;

Separates the positive and negative sub-patterns.

 

-

Minus sign.

 

%

Multiply by 100 and show as percentage.

 

¤

Base currency symbol. If doubled, replaced by international currency symbol (the actual symbol varies with the locale - e.g. $ in US).

 

E

Separates the mantissa and exponent in a scientific notation.

 

'

Used to quote special characters in a prefix or suffix, for example, "'#'#" formats 123 to "#123". To create a single quote itself, use two in a row: "# o''clock".

 

 

 

 

Explanation of the pattern symbols (Date):

 

G

Era designator, e.g. AD

 

y

Year; e.g. 1996; 96

 

m

Month in year, e.g. July; Jul; 07

 

w

Week in year, e.g. 27

 

W

Week in month, e.g. 2

 

D

Day in year, e.g. 189

 

d

Day in month, e.g. 10

 

F

Day of week in month; e.g. 2

 

E

Day in week,e.g. Tuesday; Tue

 

a

Am/pm marker, e.g. PM

 

H

Hour in day (0-23), e.g. 0

 

k

Hour in day (1-24), e.g. 24

 

K

Hour in am/pm (0-12), e.g. 0

 

h

Hour in am/pm (1-12), e.g. 12

 

m

Minute in hour, e.g. 30

 

s

Second in minute, e.g. 55

 

S

Millisecond, e.g. 978

 

z

Time zone, e.g. Pacific Standard Time; PST; GMT-08:00

 

Z

Time zone, e.g. -0800

 

 

 

  • Predefined Format

    It is also possible to select one of the predefined formats so that you don't have to worry about the pattern symbols. The predefined formats reflect the current language (i.e. the pattern changes as you switch the language - e.g. M/d/yy is used for United States, but dd.MM.yy for Germany). You can modifiy the pattern as described above but the format will change (will be saved to) the fixed Pattern.

See Also

Attributes Tab

Subtab - Properties

Subtab - Styles

Subtab - Defaults

Subtab - Description

Deleting Object Type Attributes

Generating and Comparing DLL Scripts

Full Text Index (FTI)