mercredi 23 mars 2016

Converting date column in sqlite, can't query against it

I'm importing .csv files into an SQLite database. I am attempting to query against one of the tables. I think it is getting hung up on dates, which are in MM/DD/YYYY format. Not all months and days are two digits either.

I've tried this query:

SELECT * FROM <table> 
WHERE 'account' = <account_number> 
and 'date' between '1900-01-01' and '2013-03-03'

I've also tried:

select * from <table> 
where 'account' = <account_number> 
and 'date' > '1901-01-01' and 'date' < '2013-03-03'

It doesn't work.

Aucun commentaire:

Enregistrer un commentaire