What i've found is that the oracle has the date stored at 2016/04/12 and when the parse occurs, it looks for a - to seperate and cant find it. This is why it states that its not an integer because the "/" are included in the term... is there a way to parse with "/" instead of "-"? i know SQL stores date in the YYYY-MM-DD format so thats why its not an issue there, but im not quite sure what to do with oracle and setting the field to "date".
On Tuesday, July 19, 2016 at 3:54:10 PM UTC-4, web2py...@gmail.com wrote: > > Hi everyone, > > i keep getting this error: > > File "/web2py/gluon/packages/dal/pydal/adapters/base.py", line 1544, in > parse_date > (y, m, d) = map(int, str(value)[:10].strip().split('-')) > ValueError: invalid literal for int() with base 10: '2016/04/12' > > > im basically submitting the form and searching a database for information > between certain dates using DAL with a table. the table/date format is > summarized as follows: > > import datetime > > today = datetime.datetime.today() > > yesterday = today.date() - datetime.timedelta(days=1) > > db = DAL(oracle:...........) > > db.table('name', Field('startdt' , type = 'date' , default = yesterday, > requires IS_DATE(format('%Y/%M/%D))), > > Field('enddt', type = 'date' , default = today, > requires IS_DATE(format('%Y/%M/%D))), > > ......) > > > Im thinking it doesn't like the database has the format but not 100%. > > > thank you > > > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.