Oracle Date Format Tester

Test Oracle TO_CHAR / TO_DATE format masks instantly. Enter a date and format string to see the formatted output.

Case-sensitive. Use double quotes for literal text: "of"

Formatted Output

Invalid date

Format Token Reference

TokenDescription
YYYY4-digit year (2024)
YYY3-digit year (024)
YY2-digit year (24)
Y1-digit year (4)
IYYYISO 4-digit year
IYISO 2-digit year
RRRRRound-trip year (handles 2-digit)
RRRound-trip 2-digit year
MMMonth number (01-12)
MONAbbreviated month (JAN)
MONTHFull month name (JANUARY)
RMRoman numeral month (I-XII)
DDDay of month (01-31)
DDDDay of year (001-366)
DDay of week (1-7)
DAYFull day name (MONDAY)
DYAbbreviated day (MON)
JJulian day number
HH24Hour 24-hour (00-23)
HH12Hour 12-hour (01-12)
HHHour 12-hour (01-12)
MIMinute (00-59)
SSSecond (00-59)
SSSSSSeconds past midnight (0-86399)
FFFractional seconds
AM/PMMeridian indicator
A.M./P.M.Meridian with dots
QQuarter (1-4)
WWeek of month (1-5)
WWWeek of year (1-53)
IWISO week of year (1-52/53)
CCCentury
SCCCentury with BC/AD
SPSpell number (spelled out)
THOrdinal suffix (ST, ND, RD, TH)
SPTHSpelled ordinal (FIRST, SECOND...)

Common Examples

YYYY-MM-DD
Standard ISO date
DD-MON-YYYY
Day-Month abbrev-Year
Month DD, YYYY
Full month name
MON DD, YYYY
Abbreviated month
Day, Month DD, YYYY
Day name + full date
YYYY-MM-DD HH24:MI:SS
Full datetime 24hr
DD/MM/YYYY HH:MI AM
12-hour with AM/PM
YYYY-"Q"Q
Year and quarter
IW/IYYY
ISO week/year
DDSPTH "of" Month
Ordinal day (1st, 2nd...)
YYYY-MM-DD"T"HH24:MI:SS
ISO 8601
J
Julian day number

Modifiers

  • TH — Ordinal suffix: DDTH → 01ST, 02ND, 03RD
  • SP — Spell number: DDSP → ONE, TWO
  • SPTH — Spelled ordinal: DDSPTH → FIRST, SECOND
  • FM — Fill mode (suppress padding): FMMonth → January (no trailing spaces)
  • Literal text — Double quotes: 'of' → of

Tips

  • Oracle format masks are case-sensitive — use YYYY, MM, DD, HH24, MI, SS
  • TO_CHAR(date, 'YYYY-MM-DD') formats a date to string
  • TO_DATE('2024-01-15', 'YYYY-MM-DD') parses string to date
  • For 12-hour time use HH:MI AM; for 24-hour use HH24:MI
  • RR / RRRR handle 2-digit years with 50-year pivot (1950-2049)
  • Use IW + IYYY for ISO week/year

More from Developer Tools

Browse all 100 tools →

Build custom software with us

From internal tools to full platforms — we deliver end to end.

Was this tool useful?