P
P
Pavel2012-01-18 08:25:54
iOS
Pavel, 2012-01-18 08:25:54

IOS, SQLite and working with datetime?

I am new to iOS programming and working with SQLite database. Prior to that, he worked with MS SQL.
SQLite does not have the same data type as DateTime. How to work with dates? In what format to save?
There is a table with 2 fields: name text, created text.
In the created field, date and time (in the format yyyy-MM-dd HH:mm:ss). How to make a selection in a range of dates? For example, I need to get all entries that were made on January 5, 2012?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Kuzovlev, 2012-01-18
@KY3EH

Look here: http://www.sqlite.org/lang_datefunc.html

A
Alexey Grichenko, 2012-01-18
@Kalobok

Wouldn't it be easier to use int or real for such purposes?
www.sqlite.org/datatype3.html#datetime

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question