每当您要将String转换为Date对象时,
SimpleDateFormat#parse
请使用尝试使用
String dateInString = new java.text.SimpleDateFormat("EEEE, dd/MM/yyyy/hh:mm:ss") .format(cal.getTime())SimpleDateFormat formatter = new SimpleDateFormat("EEEE, dd/MM/yyyy/hh:mm:ss");Date parsedDate = formatter.parse(dateInString);。另外的事情是,如果您想将转换为
Date,
String则应该使用
SimpleDateFormat#format函数。
现在
new Date(String)已不建议使用Point for you,现在
不建议使用
SimpleDateFormat#parse。现在任何人想要解析时,都应该使用。
有关在SimpleDateFormat选项中使用的更多日期和时间模式,请参考官方文档。



