I have an iOS app that takes use of SQLite. I use FireFox and the plugin SQLite Manager for managing the database.
Now I have a table like this:
CREATE TABLE "someTable" ("id" INTEGER NOT NULL , "timeOfEvent" DATETIME NOT NULL)
I am however able to input practically any value I want into the DateTime column like so:
INSERT INTO sometable (id, timeOfEvent) VALUES (1,'2012-99-99')
INSERT INTO sometable (id, timeOfEvent) VALUES (2,'yyyy-mm-dd')
...etc
Why is this possible?
As per the documentation: SQLite- Data Types
Thus SQLite relies on methods to convert the values. It doesn’t have it’s own data type to restrict date/time type.