zoukankan      html  css  js  c++  java
  • 按照日期查询最近7天,一个月功能

         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());
            }
  • 相关阅读:
    Eclipse 添加行号
    http中 get方法 传送中文参数乱码解决办法
    第一章 java 语言概述
    Python学习
    Python学习
    Python学习
    Python学习
    Python学习
    Python学习
    Python学习
  • 原文地址:https://www.cnblogs.com/BINGJJFLY/p/7477378.html
Copyright © 2011-2022 走看看