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 .