From dc7f4afcc7df30d2d2cc78ff112830658c57676c Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期二, 09 十一月 2021 16:08:41 +0800
Subject: [PATCH] 时间格式转化问题

---
 src/main/java/com/platform/util/DateHandleTool.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/platform/util/DateHandleTool.java b/src/main/java/com/platform/util/DateHandleTool.java
new file mode 100644
index 0000000..114a3c2
--- /dev/null
+++ b/src/main/java/com/platform/util/DateHandleTool.java
@@ -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;
+    }
+
+
+}

--
Gitblit v1.8.0