Hi,db = DAL(..., migrate_enable=False)db.define_table('table', Field('fld01'), Field('fld02'),'integer',length=7)db.fld02 actually is a date field with format CYYMMDD.
I would like to send this field to view and display as normal date format so that it will work with AJAX calendar.How could I do that? Many thanks.
import datetime
day = fld02 % 100
month = (fld02 / 100) % 100
year = (fld02/10000) % 100
century = 2000 if (fld02/100000 == 0) else 1900
df = datetime.datetime(century + year, month, day)