String begindate=d2.format(startdate);
String t1 = begindate.replace('-','/');
String t2 =end.replace('-','/');
try{
Date dt1= new Date(t1);
Date dt2= new Date(t2);
System.out.println("dt1="+dt1.getTime());
System.out.println("dt2="+dt2.getTime());
long l = dt1.getTime() - dt2.getTime();
long count=(l/60/60/1000/24);
if (count<=0){
sqlMapExecutor.update("common.UpDateUserState",paramMap);
return false;
}
}catch(Exception e){
System.out.println("exception"+e.toString());
}
时间比较
最新推荐文章于 2022-09-17 16:52:03 发布