Can anybody let me know about the date formats available in SimpleDateFormat class.
I have gone through api but could not find a satisfactory answer.Any help is highly appreciated.
Date and time formats are well described below
SimpleDateFormat (Java Platform SE 7) - Date and Time Patterns
There could be n Number of formats you can possibly make. ex - dd/MM/yyyy or YYYY-'W'ww-u or you can mix and match the letters to achieve your required pattern. Pattern letters are as follow.
n
dd/MM/yyyy
YYYY-'W'ww-u
G
y
Y
M
w
W
D
d
F
E
u
a
H
k
K
h
m
s
S
z
Z
X
To parse:
2000-01-23T04:56:07.000+0000
Use: new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
1.4m articles
1.4m replys
5 comments
57.0k users