首页 > 代码库 > sqlite 获取当天当周当月等数据

sqlite 获取当天当周当月等数据

----昨天select * fromwhere Time>=datetime(now,start of day,-1 day) and Time<datetime(now,start of day,+0 day)----当天select * fromwhere Time>=datetime(now,start of day,+0 day) and Time<datetime(now,start of day,+1 day)----当周select  * fromwhere Time>=datetime(now,start of day,-7 day,weekday 1) AND Time<datetime(now,start of day,+0 day,weekday 1)----当月select * fromwhere Time>=datetime(now,start of month,+0 month,-0 day) AND Time < datetime(now,start of month,+1 month,0 day)----上月select * fromwhere Time>=datetime(now,start of month,-1 month,-0 day) AND Time <datetime(now,start of month,+0 month,-1 day)

 

sqlite 获取当天当周当月等数据