What you want is here: http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
I'm thinking you want: select First_Capture from PIT_manatees where date(First_Capture) < '2000-1-1' limit 5; - Scott Chris Fonnesbeck wrote: > I'm at a complete loss about how to work with dates in SQLite. The > documentation doesnt seem to be helping me. I have a table with some date > fields, in the proper yyyy-mm-dd format: > > sqlite> select First_Capture from PIT_manatees limit 5; > 1997-6-17 > 1998-5-6 > 1997-6-24 > 1998-5-6 > 2000-3-15 > > however, it does not respond properly to comparisons to dates: > > sqlite> select First_Capture from PIT_manatees where First_Capture<2000-1-1 > limit 5; > sqlite> > > this doesnt work either: > > sqlite> select First_Capture from PIT_manatees where > First_Capture<date('2000-1-1') limit 5; > sqlite> > > note that these columns are in the 'date' format. > > Yet more strangeness: > > > sqlite> select date(First_Capture) from PIT_manatees limit 10; > > > > > > > > 1999-10-13 > > > sqlite> > > Not sure what that is all about -- all the results are blank except one, > ewven though every record is in exactly the same format. > > I'm totally perplexed by date handling in SQLite, so any help is most > appreciated. > > Thanks, -- Scott Baker - Canby Telcom RHCE - System Administrator - 503.266.8253 ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------