src/main/java/com/platform/util/DateHandleTool.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/platform/util/DateHandleTool.java
New file @@ -0,0 +1,26 @@ package com.platform.util; import com.hx.util.DateUtil; import com.platform.exception.PlatTipsException; import com.platform.resultTool.PlatformCode; import java.util.Date; public class DateHandleTool { /** * 时间转化 * @return */ public static Date timeCheck(String time,String format){ Date date = null; try{ date = DateUtil.parseString(time,format); }catch (Exception e){ throw new PlatTipsException(PlatformCode.ERROR_TIPS,"time format error"); } return date; } }