sqlite-按日期分组,根据日期查询详细内容

一.按日期分组

String paramString = "select strftime('%Y-%m-%d',"+DBConfig.RUNNING_LOG_DATE+") as "+FORMAT_DATE+" from "
                    +DBConfig.TABLE_RUNNING_LOG+" group by strftime('%Y-%m-%d',"+DBConfig.RUNNING_LOG_DATE+") order by "+FORMAT_DATE+" desc";

二.根据日期查询详细内容

String paramString = "select * from "+DBConfig.TABLE_RUNNING_LOG+" where strftime('%Y-%m-%d',"+DBConfig.RUNNING_LOG_DATE+") = '"+dateStr+"' order by id desc";

 

posted @ 2017-10-24 16:33  夜行过客  阅读(4024)  评论(0编辑  收藏  举报