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

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -