*@paramdateDate
*@return
*/
publicstaticStringdateToStrLong(java.util.DatedateDate){
SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-dd
HH:mm:ss");
StringdateString=formatter.format(dateDate);
returndateString;
}
/**
*将短时间格式时间转换为字符串yyyy-MM-dd
*
*@paramdateDate
*@paramk
*@return
*/
publicstaticStringdateToStr(java.util.DatedateDate){
SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-dd");
StringdateString=formatter.format(dateDate);
returndateString;
}
/**
*将短时间格式字符串转换为时间yyyy-MM-dd
*
*@paramstrDate
*@return
*/
publicstaticDatestrToDate(StringstrDate){
SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-dd");
ParsePositionpos=newParsePosition(0);
Datestrtodate=formatter.parse(strDate,pos);
returnstrtodate;
}
/**
*得到现在时间
*
*@return
*/
publicstaticDategetNow(){
DatecurrentTime=newDate();
returncurrentTime;
}
/**