时间字符串处理

pull/146/head
厚积薄发 2019-11-21 10:15:24 +08:00 committed by Gitee
parent b05a539970
commit 868edbc88c
1 changed files with 9 additions and 1 deletions

View File

@ -224,7 +224,15 @@ public class ExcelUtil<T>
}
else
{
val = Convert.toStr(val);
String dateFormat = field.getAnnotation(Excel.class).dateFormat();
if(StringUtils.isNotEmpty(dateFormat))
{
val=DateUtils.parseDateToStr(dateFormat,(Date) val);
}
else
{
val = Convert.toStr(val);
}
}
}
else if ((Integer.TYPE == fieldType) || (Integer.class == fieldType))