On Mon, 4 Jun 2007, 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
Any help most appreciated.
Chris,
I cannot tell you the answer with certainty, but two things jump out at me
about your data:
1) They are not in yyyy-mm-dd format, but in yyyy-m(m)-d(d) format. I
always enter dates with a leading zero; e.g., 1997-06-17.
2) Dates are strings (see <http://www.sqlite.org/datatype3.html> for
SQLite3 data storage classes). I put them between single quotes for
comparison purposes as text strings.
HTH,
Rich
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------