GIS ObjectLand. User Manual
previouscontentsnext / Layouts / Chapter 48. Tables / Formatting values

Data formats

Below you will find rules of formatting all types of data admissible for table cells.

Numeric format

The notion of a numeric format unites different representations of integer and fractional numbers. The following representations belong to this type:

Angle value

Display in quadrant format

0° – 89°

NE 0°NE 89°

90° – 179°

SE 0°SE 89°

180° – 269°

SW 0°SW 89°

270° – 359°

NW 0°NW 89°

Table 48-1. Displaying angles in quadrant format

There is a possibility to use different representations of positive and negative numbers. If the formatting string contains the character “;”, a part of the line located to the left of the semicolon is used for formatting positive and zero values, and the right part – for negative ones.

Formatting of numeric values by default (when the pattern “@” is specified) is determined on the basis of Windows settings.

Examples of formatting numeric values using different formatting strings are provided in table 48-2. It is assumed that a point is used as a decimal separator in Windows.

Value

Formatting string

12345

12345.678

-1

0.00000012

@

12 345

12 345.68

-1

0

0

12345

12346

-1

0

000.00 kg

12345.00 kg

12345.68 kg

-001.00 kg

000.00 kg

$# ##0.00

$12 345.00

$12 345.68

$-1.00

$0.00

0.00E+00

1.23E+04

1.23E+04

-1.00E+00

1.20E-07

##0.0E+00

123.4E+02

123.5E+02

-100.0E-02

120.0E-09

0.000E0

1.234E4

1.235E4

-1.000E0

1.200E-7

?/?

12345/1

37037/3

-1/1

1/8333333

# ??/??

12345

12345 40/59

-1

1/8333333

&# ##0.00 Debit;
&# ##0.00 Credit

12 345.00 Debit

12 345.68 Debit

1.00 Credit

0.00 Debit

Table 48-2. Examples of formatting numeric values

Date format

For values of the type “Date” such elements as year, month, day of the week and day can be displayed in arbitrary order. The following patterns serve for highlighting date elements:

All other characters of the formatting string are displayed without changes.

Formatting of date value by default is determined on the basis of Windows settings (when the pattern “@” is specified).

In table 48-3 examples of formatting dates are given.

Value

Formatting string

February 25, 2002

June 12, 1990

MM.dd.yyyy

02.25.2002

06.12.1990

MMM dd, yyyy

Feb 25, 2002

Jun 12, 1990

MMMM dd, yyyy.

February 25, 2002

June 12, 1990

The dth of MMMM

The 25th of February

The 12th of June

Table 48-3. Examples of formatting date values

Time format

Values of the type “Time” consist of numbers of hours, minutes and seconds which can be displayed in any combination and in arbitrary order. To select time elements the following patterns are used:

All other characters of the formatting string are displayed without changes.

Formatting of time value by default is determined on the basis of Windows settings (when the pattern “@” is specified).

In table 48-4 examples of formatting time are given.

Value

Formatting string

8:30

17:00

H:mm:ss

8:30:00

17:00:00

HH:mm:ss

08:30:00

17:00:00

h:mm t

8:30 AM

5:30 PM

Hours: HH Minutes: mm

Hours: 08 Minutes: 30

Hours: 17 Minutes: 00

Table 48-4. Examples of formatting time values

Timestamp format

Since this type of data combines the date and time, the formatting string can have patterns belonging both to the date and to the time.

All the characters of the formatting string belonging to neither date patterns, not time patterns are displayed without changes.

Formatting of timestamp values is determined by default on the basis of Windows settings (when the pattern @ is specified).

In table 48-5 examples of formatting timestamp are given.

Value

Formatting string

02.25.2002, 7:35 PM

01.01.1999, 7:00 AM

d.MM.yy HH:mm

25.02.02 19:35

1.01.99 07:00

MMM d yyyy h:mm t

Feb 25 2002 7:35 PM

Jan 1 1999 7:00 AM

MM.dd.yyyy H:mm:ss t

02.25.2002 7:35:00 PM

01.01.1999 7:00:00 AM

Table 48-5. Examples of formatting timestamp values

String format

Formatting of string values by default (the pattern “@”) denotes displaying a string as it is without any changes. Other patterns which can be used in the formatting string are the following ones:

If enumerated patterns are met several times in the formatting string, formatted string value will substitute each pattern.

In table 48-6 Examples of formatting string values are given.

Value

Formatting string

Taganrog is founded by Peter the Great

@

Taganrog is founded by Peter the Great

A

TAGANROG IS FOUNDED BY PETER THE GREAT

a

taganrog is founded by peter the great

Aa

Taganrog Is Founded By Peter The Great

"@"

"Taganrog is founded by Peter the Great"

Table 48-6. Examples of formatting string values

Boolean format

Words “yes” and “no” serve as default representation (the pattern “@”) for Boolean values.

The formatting string for Boolean values consists of two parts separated by the character of a slash “/”. Part of the string to the left of the separator is used as representation of true value, the right part – for representation of false value.

If there is no separator in the formatting string, the whole string is used as representation of true value, and an empty string will correspond to the false value.

In table 48-7 examples of formatting Boolean values are provided.

Value

Formatting string

True

False

@

yes

no

Yes/No

Yes

No

True/False

True

False

+/–

+

You are right/

You are right

Table 48-7. Examples of formatting Boolean values

Mixed format

Specifying mixed format for a cell denotes that data of different types can be displayed in this cell. Displaying format is specified for every type of data individually. When values from the source of data are entered into cells, the format is selected in accordance with the type of these values.

When creating a table, the mixed format is set for all its cells.

Generally, the formatting string for the mixed format consists of six substrings separated by the sign of a vertical line “|”. These substrings correspond to different types of data in the following order: “Number”, “Date”, “Time”, “Timestamp”, “String”, “Boolean”. When data of some definite type is entered into a cell in the course of editing a table, the format specified for this type of data is selected for display. If one substring is missing for some definite format type (that is, if two vertical lines are typed one after another), the values of such a type will not be displayed.

If the formatting string contains less than 6 substrings, the result of display for the remaining types (for the ones for which no formatting substring is specified) will depend on whether the separator “|” is present at the end of the formatting string or no. If there is a separator, it is considered that empty formatting strings are specified for the remaining types, that is, the values of these types should not be displayed. If there is no separator at the end of the string, the remaining types are formatted by default as if the pattern “@” was specified for them.

If there are no separators in the formatting string, but the character “@” is present, then this string is used for formatting data of all types.

previoustopnext