Hi again,
For sorting and group queries the easiest seems to be to use an alias,
like this
SELECT somefield, Date(MYDATEFIELD) AS MyDate ORDER BY Mydate
Dirk Cleenwerck
Frank Bitterlich wrote:
Hey, that appears to work. It might solve the sorting/GROUP BY problem
as well...
Thanks a lot!
Cheers,
Frank+++
Am 25.04.2009 um 17:40 schrieb Dirk Cleenwerck:
Hi Frank,
Sorry for the late reply, but I've been running all nighters for a
while due to a deadline, and therefore hadn't had time to look into it.
I seemed to remember that I had solved this problem in the past, and
I just look at the code I had.
The trick is to use the SQLite functions to help you along. SQLite
does have some Date and Time functions as part of it's SQL syntax.
Read this as a reference http://www.sqlite.org/lang_datefunc.html
Anyways, the short answer to you question is to write your query like
this:
WHERE Date(MYDATEFIELD)='2009-01-01'...
I thought I'd post it, because I don't think anyone gave you that
answer yet.
It worked for me, so I hope it'll work for you too.
Dirk Cleenwerck
--
Günter Schmidt GmbH
Frank Bitterlich eMail: bitterlich@gsco.de
Ben-Gurion-Ring 21 WWW: http://www.gsco.de/
D-60437 Frankfurt Tel.: 069 / 156809-29
GERMANY Fax: 069 / 156809-28
Geschäftsführer: Jürgen Hartwich
AG Frankfurt am Main, HRB 76504 - USt.-ID: DE235219624
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|