This is more like python question but

jj.J2NSD is integer and has value = 20111130 (YYYYMMDD)

I want to set the value as default value of FFNSD which is 'date'
type.

Field('FFNSD', 'date'),

I think I need to import datetime and convert from integer or stiring.
Is anyone know easy way to do it ?


This doesn't work because it set string to date...

db.FEDEXFORM.FFNSD.default = str(jj.J2NSD)[0:4]+"-"+str(jj.J2NSD)
[4:6]+"-"+str(jj.J2NSD)[6:8]

Reply via email to