Date and Time Formatting Symbols

The following table describes the date and time format symbols that you can use when formatting dates and times in Oracle Enterprise Data Management Cloud, such as when defining extract options or using the toDate or format methods in expressions. Note that the fields are case-sensitive.

Symbol Date or Time Component Examples
G Era designator AD
y Year 1996; 96
Y Week year 2009; 09
M Month in year July; July; 07
w Week in year 27
W Week in month 2
D Day in year 10
d Day in month 2
E Day name in week Tuesday; Tue
u Day number of week (1 = Monday, 7 = Sunday) 1
a AM/PM marker PM
H Hour in day (0-23) 0
k Hour in day (1-24) 24
K Hour in AM/PM (0-11) 0
h Hour in AM/PM (1-12) 12
m Minute in hour 30
s Second in minute 55
S Millisecond 978
z Time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone -800
X Time zone -08; -0800; -08:00