如何在Sqlite数据库中按月搜索 [英] how to search by month in Sqlite database
本文介绍了如何在Sqlite数据库中按月搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
光标c = db.rawquery(select * from myTable where strftime ('%m',myDate)='07',null);
解决方案
参见 https://www.sqlite.org/lang_datefunc.html [ ^ ]; myDate
应该是日期的字符串值。
there some way to do it? actually i'am using android studio i have the next code but does not work, not display results
Cursor c = db.rawquery("select * from myTable where strftime('%m',myDate)= '07'",null);
解决方案
See https://www.sqlite.org/lang_datefunc.html[^]; myDate
should be a string value of a date.
这篇关于如何在Sqlite数据库中按月搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文