时间字符串处理

dep_wangsr
厚积薄发 5 years ago committed by Limy
parent 6d4e5e8c3a
commit c928e55b2c

@ -224,7 +224,15 @@ public class ExcelUtil<T>
} }
else 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)) else if ((Integer.TYPE == fieldType) || (Integer.class == fieldType))

Loading…
Cancel
Save