java date

Common relationship comparison table

y years
M month    
d day
H hours
m minutes
s seconds

uncommonly used

D number of days in year
h hours in AM/PM
a AM/PM marker
S milliseconds
Z time zone 
AM=AM PM=PM

Convert the Date format to a string using the format method in java.text.SimpleDateFormat

  Use the parse method to parse the string into Date format. If the parsing fails , a ParseException will be thrown .

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325226432&siteId=291194637