|
- FM
- fill mode prefix
+ FM prefix
+ fill mode (suppress padding blanks and zeroes)
FMMonth
|
- TH
- upper ordinal number suffix
+ TH suffix
+ add upper-case ordinal number suffix
DDTH
|
- th
- lower ordinal number suffix
- DDTH
+ th suffix
+ add lower-case ordinal number suffix
+ DDth
|
- FX
+ FX prefix
FiXed format global option (see below)
FX Month DD Day
|
- SP
+ SP suffix
spell mode (not yet implemented)
DDSP
Usage notes:
+
+ FM suppresses leading zeroes or trailing blanks
+ that would otherwise be added to make the output of a pattern be
+ fixed-width.
+
+
+
to_timestamp and to_date
- skip multiple blank space in converted string if the FX option
+ skip multiple blank spaces in the input string if the FX option
is not used. FX must be specified as the first item
in the template; for example
to_timestamp('2000 JUN','YYYY MON') is right, but
- to_timestamp('2000 JUN','FXYYYY MON') returns error,
- because to_timestamp() expects one blank space only.
+ to_timestamp('2000 JUN','FXYYYY MON') returns an error,
+ because to_timestamp expects one blank space only.
Ordinary text is allowed in to_char
- templates but any string between double quotes is guaranteed
- that it will not be interpreted as a template keyword and it is
- also processed faster. (Example: '"Hello Year:
- "YYYY').
+ templates and will be output literally. You can put a substring
+ in double quotes to force it to be interpreted as literal text
+ even if it contains pattern keywords. For example, in
+ '"Hello Year: "YYYY', the YYYY
+ will be replaced by year data, but the single Y
+ will not be.
- A double quote ("
) between
- quotation marks is skipped and is not parsed. If you want to
+ If you want to
have a double quote in the output you must precede it with a
- double backslash, for example '\\"YYYY
+ backslash, for example '\\"YYYY
Month\\"'.
-
Templates for to_char(numeric)
+
Template patterns for numeric conversions
|
- Template
+ Pattern
Description
- PL, SG, and
- extensions.
+ 9 specifies a value with the same number of
+ digits as there are 9s. If a digit is
+ not available use blank space.
- 9 specifies a value with the same number of
- digits as there are 9s. If a digit is
- not available use blank space.
+ TH does not convert values less than zero
+ and does not convert decimal numbers.
- TH does not convert values less than zero
- and does not convert decimal numbers. TH is
+ PL, SG, and
+ extensions.
|
- to_char(now(),'Day, HH12:MI:SS')
- 'Tuesday , 05:39:18'
+ to_char(now(),'Day, DD HH12:MI:SS')
+ 'Tuesday , 06 05:39:18'
|
- to_char(now(),'FMDay, HH12:MI:SS')
- 'Tuesday, 05:39:18'
+ to_char(now(),'FMDay, FMDD HH12:MI:SS')
+ 'Tuesday, 6 05:39:18'
|
to_char(-0.1,'99.99')