I'm assuming you're looking for SQLite date logic, where you can put the date logic in a where
clause. If that's the case, it's worth noting that SQLite doesn't even have a proper date/time data type, as discussed here. Clearly you can use NSDateFormatter to do some conversions of your strings once you get it back to Objective C, but if you want date logic in your SQL where
clauses, then you really have to conform to SQLite's guidance for the format of Time Strings outlined in SQLite Date Time Functions.
If you want a date in a human readable format, you can use something like "YYYY-MM-DD HH:MM:SS" format. See below for some examples. You can use NSDateFormatter to take this and convert it to a NSDate, from which you can then create date strings in whatever format you want for your UI.
Update:
Here is some sample SQL:
create table datetest (dt datetime);
insert into datetest values (datetime('now','-1 day'));
insert into datetest values (datetime('now'));
insert into datetest values (datetime('now','+1 day'));
select * from datetest;
select * from datetest where dt < datetime('now');
The first select statement will retrieve all three rows. The second returns just two of them.