[web2py] Re: problem with request.date and db.table.update_or_insert

2011-12-14 Thread lyn2py
Is this a field to update the date when an entry is updated/inserted? Can you post your code? On Dec 15, 5:00 am, Daniel Aguayo Catalán daniel.agu...@gmail.com wrote: Hi, i have a fieldtype 'date' in a table that I cannot create from using request.now.date() in the db.table.update_or_insert

[web2py] Re: problem with request.date and db.table.update_or_insert

2011-12-14 Thread Alan Etkin
datepart,timepart=val.split( )ValueError:need more than1value to unpack It looks like convert_timestamp() in pysqlite2.dbapi2 is expecting a date+time object and receives a date, isn't it?

Re: [web2py] Re: problem with request.date and db.table.update_or_insert

2011-12-14 Thread Daniel Aguayo Catalán
Alan Etkin escribió: datepart,timepart=val.split( )ValueError:need more than1value to unpack It looks like convert_timestamp() in pysqlite2.dbapi2 is expecting a date+time object and receives a date, isn't it? Hi, I forgot to say that the problem exists even if I try to insert a request.now

[web2py] Re: problem with request.date and db.table.update_or_insert

2011-12-14 Thread Alan Etkin
request.date.now() works well in my system (Python 2.6.5, web2py 1.99.3, Linux) Would you post part of the model and controller to see what it does? On 14 dic, 19:43, Daniel Aguayo Catalán daniel.agu...@gmail.com wrote: Alan Etkin escribi : datepart,timepart=val.split( )ValueError:need more

Re: [web2py] Re: problem with request.date and db.table.update_or_insert

2011-12-14 Thread Daniel Aguayo Catalán
Daniel Aguayo Catalán escribió: Alan Etkin escribió: datepart,timepart=val.split( )ValueError:need more than1value to unpack It looks like convert_timestamp() in pysqlite2.dbapi2 is expecting a date+time object and receives a date, isn't it? Hi, I forgot to say that the problem exists even if

Re: [web2py] Re: problem with request.date and db.table.update_or_insert

2011-12-14 Thread Daniel Aguayo Catalán
Alan Etkin escribió: request.date.now() works well in my system (Python 2.6.5, web2py 1.99.3, Linux) I think you mean request.now.date() (request.date doesn't exist in my system, web2py 1.99.3 with python 2.7.2 on gnu/linux too) Would you post part of the model and controller to see what it

[web2py] Re: problem with request.date and db.table.update_or_insert

2011-12-14 Thread Alan Etkin
I think you mean request.now.date() (request.date doesn't exist in my Right dbi('historia', ...      Field('fecha', 'string')      ) That should be a 'date' field for web2py to handle date information properly.      date = str(datetime.datetime.now()) #NO error1, but doesn't update I

Re: [web2py] Re: problem with request.date and db.table.update_or_insert

2011-12-14 Thread Daniel Aguayo Catalán
Alan Etkin escribió: dbi('historia', ... Field('fecha', 'string') ) That should be a 'date' field for web2py to handle date information properly. I changed that later. I was using the 'date' type originally when the issue came up. date = str(datetime.datetime.now()) #NO