this is not Django.

events = db(db.territory_event.territory==territory.id).select
(db.territory_event.ALL,orderby=~db.territory_event.date)

or

orderby=~db.territory_event.date|db.territory_event.territory

or

orderby=~db.territory_event.date.month()

etc.


Massimo

On Dec 28, 9:50 pm, Joel <joelcarr...@gmail.com> wrote:
> i'm doing something like this:
>
> events = db(db.territory_event.territory==territory.id).select
> (db.territory_event.ALL,orderby='-date')
>
> db.territory_event.date is of type 'date'
>
> for some reason, it seems like
> 2020-01-28 is greater than 2008-12-28
> but 2008-12-29 is not greater than 2008-12-28
>
> has anyone else gotten weird behavior sorting by date?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to