You can use it the way you want, Sqlite gives you this freedom. Some prefer to format the date as character
, something like 20160114
, others prefer to use the timestamp simple without formatting or some other numerical form and save as integer
even.
If you use a text make sure that the part of greater greatness comes before the part of lesser greatness, as in everything that requires classification, then year comes before month, which comes before day.
Remember that what is in the database is only data. Do not worry about formatting it. Formatting you do in the application the way you think best in each context. Of course you will write in some format, but choose a very simple, as the yyyymmdd
.
The between
has to be in hand, or create a C auxiliary function that helps you with this and attach it to Sqlite (this can be done in another language if it interoperates well with C.
I believe q saves as string.
– user28595