String stringData1="12:56";
SimpleDateFormat SDF=new SimpleDateFormat (HH: mm ");
The Date date2=SDF. Parse (stringData1);
System. The out. Println (date2);
The results for the
Thu Jan 01 12:56:00 CST 1970
How to operate to get the date in the day
CodePudding user response:
https://blog.csdn.net/sheep8521/article/details/88527875
CodePudding user response:
String stringData1="12:56";SimpleDateFormat SDF=new SimpleDateFormat (" yyyy - MM - dd HH: MM ");
The Date date2=SDF. Parse (LocalDate. Now (). The toString () + "" + stringData1);
System. The out. Println (date2);