How to use the SimpleDateFormat class to achieve the formatting of the "year-month-morning/afternoon: minute: second" date:
Import Java.Text.simpleDateFormat; Import Java.util.date; Public Class Test {Public Static Void Main (String [] ARGS) {System.Println (New Simpled ATeFormat ("yyyy-mm-dd ahh: mm: ss" ) .format (new date ()));}The above is the entire content of the Java code to implement the "Year-Month-morning/afternoon: minute: second". The code is very simple. I hope it will be helpful to everyone's learning.