且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

java.lang.IllegalArgumentException异常:坏类:类java.util.GregorianCalendar中的

更新时间:2023-01-24 12:54:11

一个日历不能直接格式化,您需要从日历得到的日期,就像这样:

A Calendar can't be directly formatted, you need to get the Date from the Calendar, like this:

String formattedDate = dateFormat.format(someDate.getTime());