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 <[email protected]>
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 statement (even if a 
> change the fieldtype and date value to string)Traceback(most recent call 
> last):File"/home/danto/web2py/gluon/restricted.py",line204,inrestrictedexecccodeinenvironment
>  
> File"/home/danto/web2py/applications/votomercado/controllers/info.py",line428,in<module>File"/home/danto/web2py/gluon/globals.py",line162,in<lambda>self._caller=lambdaf:f()File"/home/danto/web2py/applications/votomercado/controllers/info.py",line176,inhistorico_brand
>  fecha=date File"/home/danto/web2py/gluon/dal.py",line5617,inupdate_or_insert 
> record=self(**values)File"/home/danto/web2py/gluon/dal.py",line5502,in__call__return
>  
> self._db(query).select(limitby=(0,1),for_update=for_update).first()File"/home/danto/web2py/gluon/dal.py",line6330,inselectreturn
>  
> self.db._adapter.select(self.query,fields,attributes)File"/home/danto/web2py/gluon/dal.py",line1282,inselect
>  
> rows=response(sql)File"/home/danto/web2py/gluon/dal.py",line1272,inresponseself.execute(sql)File"/home/danto/web2py/gluon/dal.py",line1359,inexecutereturn
>  self.log_execute(*a, 
> **b)File"/home/danto/web2py/gluon/dal.py",line1353,inlog_execute 
> ret=self.cursor.execute(*a, 
> **b)File"/usr/lib/python2.7/site-packages/pysqlite2/dbapi2.py",line66,inconvert_timestamp
>  datepart,timepart=val.split(" ")ValueError:need more than1value to unpack
> what am I doing wrong?
> kind regards

Reply via email to