That's the solution! It works fine! Thanks RBS and for all answers!
Unfortunately I read this some hours ago on the wiki - but I wasn't able to
understand and use it - too impatient! Sorry! To my defense I have to say,
that I'm a MS ACCESS user learning SQLite and qt! ;-)
Now as I do know how to extract the year, month and day I do not need a
special datatype for the date, although it would be helpful sometimes. But
the wiki should have some more detailed examples for beginners.
Greetings Karsten
----- Original Message -----
From: "RB Smissaert" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Tuesday, December 26, 2006 6:30 PM
Subject: RE: [sqlite] date - SQL extraction from day, month and year
I think if your dates are in the ISO8601 format, that is yyyy-mm-dd
then this will do it:
SELECT strftime('%Y', '2006-12-26')
More fully explainede here:
http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
RBS
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 26 December 2006 17:12
To: sqlite-users@sqlite.org
Subject: [sqlite] date - SQL extraction from day, month and year
Hey,
I have a database with a field where dates are stored! As everybody knows
SQLite has no special date support such as a special datatype for date or
something else. Now I want to select only those records, where the year
ist
e.g. 2005. How can I do this?
"SELECT * FROM database WHERE (EXTRACT DAY FROM date) = 2005" does not
work.
The database was created with SQLite Analyzer 3.0.8. The datatyp of the
field date ist Text.
Thanks
Karsten
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------