I am using sqlite for local database in mobile and in my database, I have date field with column name RN_CREATE_DATE. My RN_CREATE_DATE
strftime works like this:
sqlite> select strftime('%d-%m-%Y %H:%M:%S', datetime('now'));
2012-09-13 12:42:56
If you want to use it in a WHERE clause, replace datetime('now') with the datetime you want to match in the YYYY-mm-dd HH:MM:SS format.
Example:
SELECT *
FROM t
WHERE c = strftime('%d-%m-%Y %H:%M:%S', '2012-09-13 12:44:22');
-- dd-mm-YYYY HH:MM:SS YYYY-mm-dd HH:MM:SS