chenjiahe
2022-03-31 049e231cec2e3e71dc2045826af6ba1341ac8a7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
    }
 
 
}