NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
A-63
AS DATE/TIME Clause
"time-string"
is a string that specifies how to format a time value. It can include blanks, commas,
decimal points, hyphens, periods, slashes, alphanumeric characters embedded in the
time value enclosed in apostrophes and the following keywords:
For example, the time formats in the following list cause printing of one of the
corresponding values:
M 1, 2, ... 12
MB2 1, 2, ... 12
DA Monday, Tuesday, ... Sunday
DA3 Mon, Tue, ... Sun
D2 01, 02, ... 31
DB2 1, 2, ... 31
D3 001, 002, ... 366
DB3 1, 2, ... 366
DOB2 1st, 2nd, ... 31st
DAO First, Second, ... Thirty-First
Y2 00, 01, ... 86, 87, 88, ...
YB2 0, 1, ... 86, 87, 88, ...
Y4 1900, 1901, ... 1986, 1987, 1988, ...
H[n] Specifies an hour
M[n] Specifies a minute
S[n] Specifies a second
C[n] Specifies hundredths of a second
T[n] Specifies thousandths of a second
P[n] Expresses the hour as modulo 12 with AM or PM
B[n] Suppresses leading zeros
n An integer that specifies the minimum number of digits to print. It can be 1 or 2
for all keywords but T, and 1 through 3 for T. The default is 1.
Format Values
HB 1, 2, ... 24
HP2 01, 02, ... 12AM or PM
HPB2 1, 2, ..., 12AM or PM
M2 00, 01, ... 59
MB2 0, 1, ... 59
Format Values