POI读取excel日期(数字转化成日期格式)

Calendar calendar = new GregorianCalendar(1900,0,-1);
Date d = calendar.getTime();
if (null != serviceDateStr){
	String constant = StringUtils.isBlank(serviceDateStr) ? "" : serviceDateStr;
	if (!"".equals(serviceDateStr)){
		serviceDate = DateUtils.addDays(d,Integer.valueOf(constant));
	}
}
posted @ 2022-03-17 13:54  xiexie0812  阅读(530)  评论(0)    收藏  举报