I guess that statement must be rectified.
On GAE you can use date and datetime with web2py as you normally do

db.define_table('person',SQLField('birthday','date'))
form=SQLFORM(db.person)

but you cannot build queries that extract parameters from date/
datetime. For example you cannot do

   db(db.mydatefield.year()==1999).select()

you must do instead

   db((db.mydatefield>datetime.date(1998,12,31))?
(db.mytabefield<datetime.date(2000,1,1))).select()

People have also reported that sorting by date/datetime on GAE returns
the reversed order (GAE bug, not web2py bug) and I am not sure whether
it has been fixed.



On May 10, 1:46 pm, Alexey Nezhdanov <[email protected]> wrote:
> Hmm. That's interesing. I didn't try actually, just read documentation about
> that. So it is my misinterpretation. But what does this mean then?
>
> ...but on GAE you WILL NOT BE ABLE to:
> ...manipulate date, time, datetime...
>
> (cited fromhttp://www.web2py.com/AlterEgo/default/show/138)
> May be it worths explaining it a bit more in documentation.
>
> On Sunday 10 May 2009 19:26:11 mdipierro wrote:
>
>
>
> > I do not understand. GAE has support for date/datetime.
>
> > On May 10, 9:24 am, Alexey Nezhdanov <[email protected]> wrote:
> > > Hello.
> > > I've started using web2py recently for writing a GAE-enabled site.
> > > As you know, BigTable does not have support for date/datetime fields
> > > so I decided just to use 'integer' and store time.time() there. But
> > > there is a problem with SQLFORM: I do not want user to see the actual
> > > seconds since 1.01.1970 but rather a proper calendar or, in my case,
> > > a three fields - day/month/year. So I ended up implementing an
> > > 'assotiated field' - the actual db field go in as hidden one and my
> > > <input/>'s hook into _validate chain and change the SQLFORM.vars on the
> > > fly. This is ugly but I do not know how to do it better. May be someone
> > > on this list encountered such problem before? Please share your
> > > experience.
> > > Here is my code that I'd like to get rid of:
>
> > >     MyWidget=my_tools.DateWidget()
> > >     db.freight.time_ready_start.widget=MyWidget.widget
> > >     MyWidget.timespan=db.freight.time_ready_span                # FIXME
>
> > > --
> > > Sincerely yours
> > > Alexey Nezhdanov
>
> --
> Sincerely yours
> Alexey Nezhdanov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to