3 Sep 15:43
How do I use a postgreSQL function like date_part?
Matthew Wilson <matt <at> tplus1.com>
2008-09-03 13:43:54 GMT
2008-09-03 13:43:54 GMT
I want to do a select like this with SQLObject:
select * from people
where date_part('day', createddate) = date '2008-09-01';
That query should choose people created any time on September 1st.
In SQLObject, this is what I'm doing:
People.select("date_part('day', createddate) = date '2008-09-01'")
Is there some way to avoid using a string of raw SQL?
Matt
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




RSS Feed