批量上传日期类型去掉时分秒

This commit is contained in:
446052889@qq.com 2022-09-27 09:49:38 +08:00
parent 435a42bbed
commit c274442117
2 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ public class POIUtil {
if (org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted(cell)) {// 判断是否为日期类型
Date date = cell.getDateCellValue();
DateFormat formater = new SimpleDateFormat(
"yyyy-MM-dd HH:mm");
"yyyy-MM-dd");
cellValue = formater.format(date);
} else {
cellValue = cell.getNumericCellValue() + "";