Date Edit Format Characters

Table 57. Date Edit Format Characters

Character

Description

YYY  YY  Y

Last 3, 2, or 1 digit(s) of year. On input, for calculating the 4-digit year, the current century and/or decade are used. For example, a ‘9' using the 'Y' mask would result in 1999 as the year if the current year is in the 1990s.

YYYY  SYYYY

4 digit year, “S” prefixes BC dates with “-”.

RR

Last 2 digits of year; for years in other centuries. See Table 58, Date Edit Format Code-RR.

CC or SCC

Century; “S” prefixes BC dates with “-”.

BC AD

BC/AD indicator.

Q

Quarter of year (1,2,3,4; JAN-MAR=1).

RM

Roman numeral month (I-XII; JAN=I).

WW

Week of year (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year.

W

Week of the month (1-5) where week 1 starts on the first day of the month and ends on the seventh.

DDD

Day of year (1-366).

DD

Day of month (1 - 31).

D

Day of week (1-7). Sunday is first day of week.

DAY

Name of day.

DY

Abbreviated name of day.

ER

Japanese Imperial Era. Returns the name of the of the Japanese Imperial Era in the appropriate kanji ('Heisei' is the current era).

EY

Year of the Japanese Imperial Era. Returns the current year within the Japanese Imperial Era.

Note: The common Japanese date format is: 'YYYY<nen>MM<gatsu>DD<nichi>' where <nen>, <gatsu>, and <nichi> are the kanji strings for year, month, and day respectively.

J

Julian day; the number of days since Jan 1, 4713 BC. Numbers specified with 'J' must be integers.

AM PM

Meridian indicator.

HH

Assumes 24 hour clock unless meridian indicator specified.

HH12

Hour of day (1-12).

HH24

Hour of day (0-23).

SSSSS

Seconds past midnight (0-86399).

N NN NNN NNNN NNNNN NNNNNN

Fractions of a second. Precise to microseconds; however, for most hardware and databases, this much accuracy will not be attainable.

MONTH

Name of month.

MON

Abbreviated name of month.

MM

Month (01-12; JAN=01).

MI

Minute (0-59).

SS

Second (0-59).

|

Used to concatenate different masks.

Table 58. Date Edit Format Code-RR

Last 2 digits of current year

2-digit year is 00 - 49

2-digit year is 50 - 99

00 - 49

The return date is in the current century.

The return date is in the century before the current one.

50 - 99

The return date is in the century after the current one.

The return date is in the current century.