Back
I am trying to insert a datetime value into an SQLite database. It seems to be successful but when I try to retrieve the value there is an error:
<Unable to read data>
The SQL statements are:
create table myTable (name varchar(25), myDate DATETIME)insert into myTable (name,mydate) Values ('fred','jan 1 2009 13:22:15')
create table myTable (name varchar(25), myDate DATETIME)
insert into myTable (name,mydate) Values ('fred','jan 1 2009 13:22:15')
You can try using the below format:
'2007-01-01 10:00:00'
i.e. yyyy-MM-dd HH:mm:ss
Note: Use the parameterized query as this frees you from worrying about the formatting details.
31k questions
32.8k answers
501 comments
693 users