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

python - Creating a new column in a dataframe based on the result of the addition of three others -

string - Using python and postgres, variables within execute function? -