Friday, February 29, 2008, 8:29:16 AM, you wrote:

YZ> It seems that sqlite3 does not support DATETIME data type.

YZ> If I have the following data in table t1, how do I select people who is
YZ> older than certain date?

YZ> create table t1(dob text, name text);
YZ> insert into t1('11/12/1930', 'Larry');
YZ> insert into t1('2/23/2003', 'Mary');

YZ> select * from t1 where dob < '3/24/1950';

Well I'm very new to SQLite but I think you need to use the formats
specified on "Date And Time Functions" Wiki page:
http://www.sqlite.org/cvstrac/wiki/wiki?p=DateAndTimeFunctions 

Trying to compare dates in the format you have used would require
conversion to something sensible like YYYY-MM-DD

I am personally a big fan of the ISO-8601 format and use them
everywhere.

-- 
Best regards,
  Neville Franks, http://www.surfulater.com http://blog.surfulater.com
 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to