

Significant to the result, but the input string can have fewer or more One or more digits following the decimal point.Įxactly three digits are shown in the examples because only the first three digits are In formats 4, 7, and 10, the fractional seconds value SS.SSS can have

For example, all of theįollowing time strings are equivalent: 08:23:19.120 Any non-zero "HH:MM" suffix is subtracted from the indicatedĭate and time in order to compute zulu time. The date and timeįunctions use UTC or "zulu" time internally, and so the "Z" suffix isĪ no-op. Indicator of the form "HH:MM" or just "Z". Number expressed as a floating point value.įormats 2 through 10 may be optionally followed by a timezone Universal Coordinated Time (UTC) is used. Value for multiple invocations within the same sqlite3_step() call. The 'now'Īrgument to date and time functions always returns exactly the same The xCurrentTime method of the sqlite3_vfs object in use. 'now', is converted into the current date and time as obtained from In formats 5 through 7, the "T" is a literal character separating theĭate and the time, as required by ISO-8601. In the case of dates/timestamps it will likely be best to store the data as one of the accepted Time Strings :-Ī time string can be in any of the following formats: YYYY-MM-DD What is important is the actual data that you store. The above is an overview of Datatypes In SQLite Version 3Īs such, except when considering the affect that type affinity has on the data when extracted, the column type isn't really a factor.

DECIMAL, DECIMAL(10,5) also drop down to rule 5 and thus result in a type affinity of **NUMERIC. (mycolumn Rumplestilskin) is valid as it is resolved to a type affinity of NUMERIC* (rule 5 - see link below for rules). When a column is defined the column type resolves into one of 5 column types (column affinity) according to a set of rules (see link below),Į.g. SQLite has a dyanmic/flexible type, which, with the exception of an alias of the rowid column ( INTEGER PRIMARY KEY (with or without AUTOINCREMENT)) or the rowid column itself, allows any column to hold data of any storage type (TEXT, INTEGER, REAL, NULL or BLOB).
