help of database filtered by datetime

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

help of database filtered by datetime

Postby michael_g_hu » Tue Jul 29, 2008 4:17 am

I have create a database like below:
db.execSQL("CREATE TABLE petrol (" + "_id INTEGER PRIMARY KEY,"
+ "date datetime," + "total INTEGER," + "price FLOAT)");

and I want to get the specified month rows using the command like below:
mSelection = "year(date)=2008 and month(date)=2"
mResolver.query(Provider.CONTENT_URI, null, mSelection, null, null);
but an error appeared wrote:
no such function: month while compiling....

does the database of android supoort the year or month function?
Posts: 35
Joined: Fri Mar 21, 2008 9:46 am


Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests