RE: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Samuel R. Neff
te-users@sqlite.org Subject: Re: [sqlite] Querying DATE column with date/time string. Thanks Dan, Igor, Donald, and Simon! It's a problem with the Django library (a Python web framework), where that between clause is being used for several different databases. I'm going to report back

Re: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Doug Van Horn
Doug Van Horn wrote: > > Hi, > > I'm running into a problem with the database library in Django running > against SQLite. I'm trying to understand why the following happens: > > $ sqlite3 date_test > SQLite version 3.4.2 > Enter ".help" for instructions > sqlite> create table foo (d date null

RE: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Griggs, Donald
Hi Doug, You're not storing the dates as anything other than plain text, so the short value: '2008-01-01' is lexigraphically "less than" your lower bound string of: '2008-01-01 00:00:00' and so falls outside the range of your "BETWEEN" select. If you want to keep treating the strings as

Re: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Simon Davies
Hi Doug, I'm guessing that you expect your inserted values to be treated as a date. BUT sqlite> create table foo( d date null ); sqlite> insert into foo(d) values( '2008-01-01' ); sqlite> select d, typeof(d) from foo; 2008-01-01|text http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions may

RE: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Igor Sereda
qlite] Querying DATE column with date/time string. Hi, I'm running into a problem with the database library in Django running against SQLite. I'm trying to understand why the following happens: $ sqlite3 date_test SQLite version 3.4.2 Enter ".help" for instructions sqlite

Re: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Dan
On Dec 6, 2007, at 9:48 PM, Doug Van Horn wrote: Hi, I'm running into a problem with the database library in Django running against SQLite. I'm trying to understand why the following happens: $ sqlite3 date_test SQLite version 3.4.2 Enter ".help" for instructions sqlite> create table foo (d

[sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Doug Van Horn
Hi, I'm running into a problem with the database library in Django running against SQLite. I'm trying to understand why the following happens: $ sqlite3 date_test SQLite version 3.4.2 Enter ".help" for instructions sqlite> create table foo (d date null); sqlite> insert into foo (d) values ('200