How to receive input as yyyyMMddHHmm format in java?

后端 未结 3 895
天命终不由人
天命终不由人 2021-01-21 07:33
SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMddHHmm\");
java.util.Date parsedDate = sdf.parse(\"201212130900\");
java.sql.Timestamp timestamp = new java.sql.Times         


        
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-21 07:59

    I have solved the above problem.

    I converted the date to "yyyyMMdd" format and converted the time in "HHmm" format, storing them as 2 different strings.

提交回复
热议问题