sql - How do I insert datetime value into a SQLite database? -


i trying insert datetime value sqlite database. seems sucsessful when try retrieve value there error:

<unable read data>

the sql statements are:

create table mytable (name varchar(25), mydate datetime) insert mytable (name,mydate) values ('fred','jan 1 2009 13:22:15') 

the format need is:

'2007-01-01 10:00:00' 

i.e. yyyy-mm-dd hh:mm:ss

if possible, however, use parameterised query frees worrying formatting details.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

php - Cannot override Laravel Spark authentication with own implementation -

What is happening when Matlab is starting a "parallel pool"? -