Field date error

24 views
Skip to first unread message

Winter Kryz

unread,
Apr 24, 2017, 12:04:09 AM4/24/17
to web2py-users
Hello everybody,

I have a table
db.define_table('Person',
               
Field('last_name', 'string'),
               
Field('first_name', 'string'),
                Field('
nationality','string'),
                Field('birth_date', 'date', requires = IS_NOT_EMPTY(error_message="select a date")),
)


and when I try to put that into that table I get this error. I tried to drop the table, clean the past data but no luck

 ValueError: invalid literal for int() with base 10: '06/04/2017'

Any ideas would be appreciated?

Thanks

Dave S

unread,
Apr 24, 2017, 4:32:56 PM4/24/17
to web2py-users

A mis-match between the locale date format and the default format expected by the date widget?  You don't specifiy a date format in your field definition.  (One sometimes has issues also with the client and server locales differing.)

/dps


Reply all
Reply to author
Forward
0 new messages