Hi Jaime,
Jaime Wyant wrote:
> If you just want to select on a date using datetime, something like the
> code below ought to work. Can anyone explain how you could query based
> on a specific year? For instance, how would you select all birthdays
> where year is 1974?
>
From an earlier discussion I copied this and modified it a little:
events = Event.select ( AND
( Event.q.date >= datetime ( yearstart, monthstart,
daystart),
Event.q.date <= datetime ( yearend,
monthend,dayend) ) )
In your case you have to substitute
1974 for yearstart
1 for monthstart
1 for daystart
1974 for yearend
12 for monthend
31 for dayend
This is untested because my little app is recovering form a 'transplant' :-)
Frans.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss