Java SimpleDateFormat date - time format parameter

letter          Date or time element Show          Examples          
G     Era designator Text  AD
Y year Year 1996; 96
M   In the month Month July; Jul; 07
w Week number of years Number 27
W The number of weeks of the month Number 2
D Year-round basis heaven number Number   189
d The number of days of the month Number 10 
F The week of the month Number 2  
E Days of the week Text Tuesday; Tue 
a Am / pm marker Text PM
The number of hours of the day (0-23) Number   0  
k The number of hours of the day (1-24) Number   24
K am (noon) / pm hours (afternoon) in (0-11) Number   0
am (noon) / pm hours (afternoon) in (1-12) Number   12
m The number of minutes in the hour Number 30  
s The number of seconds in a minute Number    55  
S The number of milliseconds Number   978 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note: z, when Z area is not common, but also affect my table appearance.

Guess you like

Origin www.cnblogs.com/sinosoft/p/11078903.html