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;
|
}
|
|
|
}
|