Thanks to everyone for their help and advice. I think I get it now.
Cheers,
cf
On 6/4/07, Chris Fonnesbeck <[EMAIL PROTECTED]> 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 -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
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,
--
Christopher J. Fonnesbeck
Population Ecologist, Marine Mammal Section
Fish & Wildlife Research Institute (FWC)
St. Petersburg, FL
Adjunct Assistant Professor
Warnell School of Forestry and Natural Resources
University of Georgia
Athens, GA
T: 727.235.5570
E: Chris dot Fonnesbeck at MyFWC dot com
--
Christopher J. Fonnesbeck
Population Ecologist, Marine Mammal Section
Fish & Wildlife Research Institute (FWC)
St. Petersburg, FL
Adjunct Assistant Professor
Warnell School of Forestry and Natural Resources
University of Georgia
Athens, GA
T: 727.235.5570
E: Chris dot Fonnesbeck at MyFWC dot com