Clarifying,
date fields are stored in internal format and they are optimized for that.
You can customize representation format, not stored format. It was
what Ovidio showed you.
--
Vinicius Assef.
On Tue, Oct 11, 2011 at 10:16 PM, Ovidio Marinho wrote:
>
> in db
> Field('start_time',
in db
Field('start_time','datetime',requires=IS_DATETIME(str(T('%Y-%m-%d
%H:%M:%S',
Field('stop_time','datetime',requires=IS_DATETIME(str(T('%Y-%m-%d
%H:%M:%S',
db.task.start_time.represent = lambda v: v.strftime('%d/%m/%Y')
db.task.stop_time.represent = lambda v: v.s
I am developing an online booking application where
I am storing the date using the date type of
web2py which stores the date in -mm-dd format.
I need to store the data in dd-mm- format in
the datastore.
For this I tried to use this :
date.requires = IS_DATE(format=T('%d-%m-%Y')
Tho
3 matches
Mail list logo