Format Model for TO_CHAR of TimesTen Datetime Data Types

Use this format model when invoking the TO_CHAR function to convert a datetime value of TT_TIMESTAMP or TT_DATE. In addition, use this format model when invoking the TO_CHAR function to convert any numeric value other than NUMBER or ORA_FLOAT.

  • If a numeric value does not fit in the specified format, TimesTen truncates the value.

  • The format string cannot exceed 50 characters.

  • D always results in a decimal point. Its value cannot be changed with an NLS parameter.

  • If a float with an absolute value less than 1e-126 or greater than 1e126 is specified as input to the TO_CHAR function, TimesTen returns an error.

Format Description

DD

Day of month (1-31)

MM

Month (1-12)

MON

Month (three character prefix)

MONTH

Month (full name blank-padded to 9 characters)

YYYY

Year (four digits)

Y,YYY

Year (with comma as shown)

YYY

Year (last three digits)

YY

Year (last two digits)

Y

Year (last digit)

Q

Quarter

HH

Hour (1-12)

HH12

Hour (1-12)

HH24

Hour (0-23)

MI

Minute (0-59)

SS

Second (0-59)

FF

Fractions of a second to a precision of six digits

FFn

Fractions of a second to the precision specified by n

AM

Meridian indicator

A.M.

Meridian indicator

PM

Meridian indicator

P.M.

Meridian indicator

- /  ,  . ; :

Punctuation to be output

"text"

Text to be output

9

Digit

0

Leading or trailing zero

.

Decimal point

,

Comma

EEEE

Scientific notation

S

Sign mode

B

Blank mode

If there are no digits, the string is filled with blanks.

FM

No-blank mode (fill mode)

If this element is used, trailing and leading spaces are suppressed.

$

Leading dollar sign