In my app i need to save the time in sqlite Database.
-
for insert i wrote the code like this:
time = [NSDate date:sqlite3_column_double(selectAllStmt, 1)];
-
it shows a warning “class method date not found“
- if I use that it doesn’t show a warning:
time = [NSDate dateWithtimeintervelsincenow:sqlite3_column_double(selectAllStmt, 1)];
But i Don’t need to store the time interval, i need to store the date only. What should I do?
First convert your SQLite DB column from datetime to Varchar and pass the date as string in the query like –
Hope this works 🙂