1, long time=system.currenttimemills (); Get current system time
2. Date formatting and conversions to and from the self-character string
YYYY: Year
MM: Month
DD: Day
HH:1~12-hour System (1-12)
HH:24-hour System (0-23)
MM: Min
SS: Seconds
S: MS
E: Day of the week
D: The day ordinal of a year
F: The first few weeks of January (the total number of days in this month divided by 7)
W: The first few weeks of the year
W: The week of January (will be calculated according to the actual situation)
A: Last afternoon logo
K: Similar to HH, indicating a 24-hour day (1-24).
K: Similar to HH, indicating a 12-hour day (0-11).
Z: Indicates time zone
String timeformat= "yyyy mm month DD Day HH:mm:SS";
SimpleDateFormat sdf=new SimpleDateFormat (TimeFormat);
String Datestring=sdf.format (new Date ());//Date formatting
/**
* Results of Operation June 01, 2018 10:21:001
**/
Date Date=sdf.parse (datestring);//Convert a string to a date type
Java easy to forget some of the methods of collection