Cannot put a date as a default value in sqlite manager

45 views Asked by At

I have a DATETIME column.

I want the default to be 1970-01-01 00:00:00

When I enter that as the value, sqliemanager complains that it isn't valid - something about the dash? But sqlite date data always has dashes.

What exactly is the value I put in the "default" box to put the date 1970-01-01 00:00:00 as the default date, for a DATETIME column?

1

There are 1 answers

0
CL. On

SQLite has no DATETIME type.

If your column contains strings in the format 1970-01-01 00:00:00, then your default value must also be a string: DEFAULT '1970-01-01 00:00:00'