ISQL and Tools

(a) Format String Details

Table 3-3: Numeric Format Strings for the COLUMN Statement

Character

Example

Description

 

 

 

9

99999

Number of 9's specifies width. If the column value is

 

 

too large to display in the specified format, ISQL

 

 

displays # characters in place of the value.

 

 

 

0

09999

Display leading zeroes.

 

 

 

$

$9999

Prefix the display with '$'.

 

 

 

B

B9999

Display blanks if the value is zero.

 

 

 

,

99,999

Display a comma at position specified by the

 

 

comma.

 

 

 

.

99,999.99

Display a decimal point at the specified position.

 

 

 

MI

99999MI

Display '-' after a negative value.

 

 

 

PR

99999PR

Display negative values between '<' and '>'.

 

 

 

Table 3-4: Date-Time Format Strings for the COLUMN Statement

 

 

 

Character

Description

 

 

 

CC

The century as a 2-digit number.

 

 

YYYY

The year as a 4-digit number.

 

 

YYY

The last 3 digits of the year.

 

 

YY

The last 2 digits of the year.

 

 

Y

The last digit of the year.

 

 

Y,YYY

The year as a 4-digit number with a comma after the first digit.

 

 

Q

The quarter of the year as 1-digit number (with values 1, 2, 3, or 4).

 

 

MM

The month value as 2-digit number (in the range 01-12).

 

 

MONTH

The name of the month as a string of 9 characters ('JANUARY' to

 

'DECEMBER ').

 

 

 

MON

The first 3 characters of the name of the month (in the range 'JAN' to

 

'DEC').

 

 

 

WW

The week of year as a 2-digit number (in the range 01-52).

 

 

 

3-18

FairCom Corporation

Page 44
Image 44
HP c-tree-SQL ISQL and Tools manual Date-Time Format Strings for the Column Statement, Character Description