public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//此处会抛异常
Date date = sdf.parse("2090-05-05");
//获取毫秒数
long longDate = date.getTime();
System.out.println(longDate);
//37975 96800 000
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//此处会抛异常
Date date = sdf.parse("2090-05-05");
//获取毫秒数
long longDate = date.getTime();
System.out.println(longDate);
//37975 96800 000
}