oops

you should have read:

Klass.q.publish_time <= endtime

sorry :-)

On 7/9/07, Florent Aide <[EMAIL PROTECTED]> wrote:
> On 7/9/07, Srinivasan R <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> > I have a TG application running on SQLObject / Postgresql. I have a
> > datetime column and need to select articles which were published
> > between two particular date ranges.
> > The online docs of SO weren't of much help.
>
> Its a shame the docs are so poor because SO is quite a decent ORM
> (though I myself had a period when I disliked it because of the lack
> of documentation)
>
> -----------------------------------------------------------------------------
> from sqlobject.sqlbuilder import AND
> import datetime
>
> starttime = datetime.datetime(2007, 01, 12)
> endtime = datetime.datetime(2007, 02, 25)
>
> res = Klass.select(AND(
>     Klass.q.publish_time >= starttime,
>     Klass.q.publish_time <= starttime
> ))
>
> -----------------------------------------------------------------------------
>
> I wrote this directly in gmail without testing but you get the idea.
>
> Cheers,
> Florent.
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to