批量上传日期类型去掉时分秒
This commit is contained in:
parent
435a42bbed
commit
c274442117
Binary file not shown.
@ -247,7 +247,7 @@ public class POIUtil {
|
|||||||
if (org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted(cell)) {// 判断是否为日期类型
|
if (org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted(cell)) {// 判断是否为日期类型
|
||||||
Date date = cell.getDateCellValue();
|
Date date = cell.getDateCellValue();
|
||||||
DateFormat formater = new SimpleDateFormat(
|
DateFormat formater = new SimpleDateFormat(
|
||||||
"yyyy-MM-dd HH:mm");
|
"yyyy-MM-dd");
|
||||||
cellValue = formater.format(date);
|
cellValue = formater.format(date);
|
||||||
} else {
|
} else {
|
||||||
cellValue = cell.getNumericCellValue() + "";
|
cellValue = cell.getNumericCellValue() + "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user