Format specifiers allowed with the TO_CHAR and TO_DATE functions
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The following table describes the format specifiers you can use with the SQL
TO_CHAR() and TO_DATE()
functions.
| Format specifier | Description | Comment |
|---|---|---|
|
A value with a leading dollar sign. For example:
$999. |
- |
|
A value with a comma in a specified position, but not
a thousands separator. For example: 1.000,00. |
- |
|
A value with a decimal point in a specified position.
For example: 99.99. |
- |
|
A value displaying a leading or trailing zero. For
example, 0999 or 9990. |
- |
|
A set number of significant digits to be displayed.
Display leading space if positive, leading minus if negative. Leading zeros are blank,
except for a zero value returning a zero for the integer part of the number. For
example: 9999. |
- |
|
Meridian indicator in the native language—with periods. | English only |
|
Meridian indicator in the native language—without periods. | English only |
|
The century as a two-digit number—computed as one greater than the first two digits of the four-digit year. | Considers 1900 to be in the 20th century, 2000 to be in the 21st century, and so on. |
|
The day of the week as a one-digit number between 1 and 7. | - |
|
A value with an NLS_NUMERIC_CHARACTER in the specified position. The default D character is a period (.), for example: 99D9. |
- |
|
The day of the week in the native language—first letter only in uppercase. | English only |
|
The day of the week in the native language—first letter only in uppercase. | English only |
|
The day of the week in the native language—entire name in uppercase. | English only |
|
The day of the month as a two-digit number between 01 and 31. | - |
|
The day of the year as a three-digit number between 001 and 365. | - |
|
The day of the week as a three-character string in the native language. | English only |
|
A value with an NLS_NUMERIC_CHARACER in the specified position. The default G character is
a comma (,), for example: 9G999. |
- |
|
The hour of the day as a two-digit number between 01 and 12. | - |
|
The hour of the day as a two-digit number between 01 and 12. | Synonym of HH |
|
The hour of the day as a two-digit number between 00 and 23. | - |
|
The ISO DAY in the range of 1-7. | - |
|
The ISO WEEK of the year in the range of 1-53 | - |
|
The ISO YEAR in the range of 0-9999. | - |
|
The Julian day. | - |
|
A value with the local currency symbol NLS_CURRENCY in the specified position. The default
L character is a dollar sign ($). For example: L999. |
- |
|
The minute of the hour as a two-digit number between 0 and 59. | - |
|
The month as a two-digit number between 01 and 12. | - |
|
The first three characters of the name of the month in the native language. | English only |
|
The first nine characters of the name of the month in the native language, right-padded with blanks. | English only |
|
Meridian indicator in the native language—with periods. | English only |
|
Meridian indicator in the native language—without periods. | English only |
|
The quarter of the year as a single digit between 1 and 4. | - |
|
The century as a two-digit number—computed as one greater than the first two digits of the four-digit year. BC dates are prefixed by "-". | Considers 1900 to be in the 20th century, 2000 to be in the 21st century, and so on. |
|
Seconds as a two-digit number between 00 and 59. | - |
|
Seconds past midnight as a number between 0 and 86339. | - |
|
Ordinal suffix appended to a number—replaced by
ST, ND, RD, or TH, depending on
the last digit of the number. |
English only |
|
The week of the month as a single digit between 1 and 5. | - |
|
The week of the year as a two-digit number between 01 and 52. | - |
|
The year as a single digit. | - |
|
The year as a four-digit number—comma separates the first digit from the other digits. | - |
|
The year as a two-digit number. | - |
|
The year as a three-digit number. | - |
|
The year as a four-digit number. | - |