Time Formatting
When formatting a date there is multiple diffrent patterns you can use. You can found out more about this by reading the Java docs by Oracle.
Understanding the different components of date formatting
Lets start off by saying that the dashes : don’t have anything to do with the actual formatting, and are just added in so it reads nicer.
HHUsing the capitolHHmakes it so that the time will be in 24 hour formathhUsing the lowercasehhmakes it so that the time will be in 12 hour formatmmMake sure to use lowercasemmin the date formatting for minutes. This is beacuse the capitolMMis used for the month.ssUsing the lowercasesswill result in the total seconds in the minuteSSUsing the capitolSSwill result in the total milisecondsaaUsing the lowercaseaawill result in getting AM or PM