Wikipedia

Search results

18 May 2013

Unicode date and time format guide

Symbol
Meaning
Example
G
era designator
G
AD
y
year
yy
yyyy or y
96
1996
Y
year of "Week of Year"
Y
1997
u
extended year
u
4601
U
cyclic year name, as in Chinese lunar calendar
U
甲子
Q
quarter
Q or QQ
QQQ
QQQQ
02
Q2
2nd quarter
q
Stand Alone quarter
q or qq
qqq
qqqq
02
Q2
2nd quarter
M
month in year
M or MM
MMM
MMMM
MMMMM
09
Sept
September
S
L
Stand Alone month in year
L or LL
LLL
LLLL
LLLLL
09
Sept
September
S
w
week of year
w or ww
27
W
week of month
W
2
d
day in month
d
dd
2
02
D
day of year
D
189
F
day of week in month

2 (2nd Wed in July)
g
modified julian day
g
2451334
E
day of week
E, EE, or EEE
EEEE
EEEEE
Tues
Tuesday
T
e
local day of week
example: if Monday is 1st day, Tuesday is 2nd )
e or ee
eee
eeee
eeeee
2
Tues
Tuesday
T
c
Stand Alone local day of week
e or ee
eee
eeee
eeeee
2
Tues
Tuesday
T
a
am/pm marker
a
pm
h
hour in am/pm (1~12)
h
hh
7
07
H
hour in day (0~23)
H
HH
0
00
k
hour in day (1~24)
k
kk
24
24
K
hour in am/pm (0~11)
K
KK
0
00
m
minute in hour
m
mm
4
04
s
second in minute
s
ss
5
05
S
millisecond (maximum of 3 significant digits);
for S or SS, truncates to the number of letters

for SSSS or longer, fills additional places with 0
S
SS
SSS
SSSS
2
23
235
2350
A
milliseconds in day
A
61201235
z
Time Zone: specific non-location
z, zz, or zzz
zzzz
PDT
Pacific Daylight Time
Z
Time Zone: RFC 822
Time Zone: localized GMT
TIme Zone: ISO8601
Z, ZZ, or ZZZ
ZZZZ
ZZZZZ
-0800
GMT-08:00
-08:00
v
Time Zone: generic non-location
v
vvvv
PT
Pacific Time or United States (Los Angeles)
V
Time Zone: specific non-location, identical to z
V
PDT
VVVV
Time Zone: generic location
VVVV
United States (Los Angeles)
W
week in month

2
'
escape for text
'
(nothing)
' '
two single quotes produce one
' '
'




Format Pattern
Result
yyyy.MM.dd G 'at' HH:mm:ss zzz
1996.07.10 AD at 15:08:56 PDT
EEE, MMM d, ''yy
Wed, July 10, '96
h:mm a
12:08 PM
hh 'o''clock' a, zzzz
12 o'clock PM, Pacific Daylight Time
K:mm a, z
0:00 PM, PST
yyyyy.MMMM.dd GGG hh:mm aaa
01996.July.10 AD 12:08 PM