yep, every now and then I strip ctrl, c and v directly from the keyboard :P
On Tuesday, September 17, 2013 12:39:03 PM UTC+2, Ramos wrote:
>
> hell with copy paste.
> I had a date field and changed to datetime but forgot to change the
> validator.
>
> Thank you a lot Niphold
>
>
>
>
>
>
> 2013/9/
hell with copy paste.
I had a date field and changed to datetime but forgot to change the
validator.
Thank you a lot Niphold
2013/9/17 Niphlod
> first and foremost if you need a datetime you should use the
> IS_DATETIME validator :-P
> Second, either you pass a FIXED format (not depen
first and foremost if you need a datetime you should use the
IS_DATETIME validator :-P
Second, either you pass a FIXED format (not dependant on T) or you act on
the "default" %Y-%m-%d translation string (from the languages section in
the admin app). It's then easier to track "bugs" on the l
If i code
db.define_table('test11',
Field('nome'),
Field('datt','datetime'))
db.test11.datt.requires=[IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),
error_message=T("Formato pretendido /mm/dd"))]
It saves the record with 2012/01/01 00:00:00 in the datt field clearing my
time selection in the
sorry the copy paste
i have this output
In [18]: IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T("Formato
pretendido /mm/dd HH:MM:SS"))("2013/09-25 09:54:24")
Out[18]: ('2013/09-25 09:54:24', 'Formato pretendido /mm/dd HH:MM:SS')
and this
In [8] : IS_DATE(format=T('%Y/%m/%d %H:%M:
i have this output
in[3]: IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T("Formato
pretendido /mm/dd HH:MM:SS"))("2013/09/25 09:54:24")
Out[17]: (datetime.date(2013, 9, 25), None)
In [4] : IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T("Formato
pretendido /mm/dd HH:MM:SS"))("20
this is a known issue of sqlite: you can't change the type and expect
everything to work out
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Gotchas
On Wednesday, September 11, 2013 1:08:46 PM UTC+2, Ramos wrote:
>
> The field was only date and i changed it to dateti
Test it and validator not error :
IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T("Formato pretendido
/mm/dd HH:MM:SS"))("2013/09/25 09:54:24")
Out[17]: (datetime.date(2013, 9, 25), None)
In [18]: IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T("Formato
pretendido /mm/dd HH:
The field was only date and i changed it to datetime afer realised i needed
the time
2013/9/11 Niphlod
> data will always be stored in ISO format. SQLite in addition stores
> datetimes as strings 'cause there's no datetime native field.
> Did you change the field after creating it ? Does this
data will always be stored in ISO format. SQLite in addition stores
datetimes as strings 'cause there's no datetime native field.
Did you change the field after creating it ? Does this error happen also on
a clean database ?
On Wednesday, September 11, 2013 10:58:56 AM UTC+2, Ramos wrote:
>
> m
10 matches
Mail list logo