Ads 468x60px

##EasyReadMore##

10 2月, 2014

sqlite 求sql語句查詢當天、本周、本月

今日:
select * from tb_tester where dt >= date("now", "localtime", "start of day");

今年:
select * from tb_tester where dt >= date("now", "localtime", "start of year");

本月:
select * from tb_tester where dt >= date("now", "localtime", "start of month");

本周:
select * from tb_tester where dt >= date("now", "localtime", "weekday 1", "-7 day", "start of day");

http://zhidao.baidu.com/question/2138082049078755508.html

0 意見:

張貼留言

 
Blogger Templates