I am using SQLite database for my application.
The Table Structure Goes Like :
_id : integer primary key
name : text
day : date
I am able to store date in format : dd-mmmmm-yyyy
eg. 15-June-2011
But when i tried to retrieve all records filtered by date from the database it returns me null.
database.query(DATABASE_TABLE, new String[] { "strftime('%d-%mm-%Y',date('now'))","strftime('%d-%m-%Y',"+KEY_DAY+")" },
"strftime('%d-%m-%Y',date('now'))=" + KEY_DAY , null,null,null,null,null);
It didnt match with anyrow's date even though there were some matching dates.
I have already gone thru documentation of SQLite. But didn find any solution yet.
I want to have something like :
select * from table where day=curdate();
How can i do the same task in SQLite ?. (Yes I am flexible to change the format of date stored in Dateabase)
What are other alternatives for the same task ?.