获得当天的开始日期和结束日期和数据库比对

来源:互联网 发布:蚁群算法基本思想 编辑:程序博客网 时间:2024/05/21 07:00
            Date date = new Date();
            SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd");
            String beginStr = dateformat.format(date) + " 00:00:00";
            String endStr = dateformat.format(date) + " 23:59:59";
            dateformat.applyPattern("yyyy-MM-dd HH:mm:ss");
             begin = dateformat.parse(beginStr);
             ends = dateformat.parse(endStr);    

1 0