码迷,mamicode.com
首页 > 其他好文 > 详细

按照日期查询最近7天,一个月功能

时间:2017-09-05 10:51:14      阅读:495      评论:0      收藏:0      [点我收藏+]

标签:style   span   sys   tin   end   div   new   param   system   

     if ("30".equals(date)) {
             Calendar now = Calendar.getInstance();      
             now.setTime(new Date());      
             now.set(Calendar.DATE, now.get(Calendar.DATE) - 30);              
             param.addParam("addtime", Operator.GTE , now.getTime());
        }else if ("90".equals(date)) {
            Calendar now = Calendar.getInstance();      
             now.setTime(new Date());      
             now.set(Calendar.DATE, now.get(Calendar.DATE) - 90); 
             param.addParam("addtime", Operator.GTE , now.getTime());
        }else if ("180".equals(date)) {
            Calendar now = Calendar.getInstance();      
             now.setTime(new Date());      
             now.set(Calendar.DATE, now.get(Calendar.DATE) - 180); 
             param.addParam("addtime", Operator.GTE ,now.getTime());
        }else if ("7".equals(date)) {
            Calendar now = Calendar.getInstance();      
             now.setTime(new Date());      
             now.set(Calendar.DATE, now.get(Calendar.DATE) - 7); 
             System.out.println(now.getTime());
             param.addParam("addtime", Operator.GTE , now.getTime());
        }

 

按照日期查询最近7天,一个月功能

标签:style   span   sys   tin   end   div   new   param   system   

原文地址:http://www.cnblogs.com/BINGJJFLY/p/7477378.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!