Re: [SQLObject] DateCol format on default
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Gustavo A. D. <gus...@gm...> - 2015-08-26 17:23:06
|
Forget this question, I just stored with default=DateTimeCol.now and when read it, just formated with datetime.strftime. Thanks! -- Gustavo A. Díaz GDNet - www.gdnet.com.ar "Servicios TI para tus necesidades" 2015-08-26 14:07 GMT-03:00 Gustavo A. Díaz <gus...@gm...>: > Hi, > > Is there anyway to change for date format on DateCol default value? > > I use DateCol(default=datetime.strftime(datetime.now(), '%d-%m-%Y') but > does not work: > > unhandled formencode.api.Invalid "expected a date/time string of the > '%Y-%m-%d' format in the DateTimeCol 'modified', got <class 'str'> > '26-08-2015' instead" > > Thanks! > > -- > > Gustavo A. Díaz > GDNet - www.gdnet.com.ar > "Servicios TI para tus necesidades" > |