Hi all,
I have the following code:
db.bookings.start_date.default = "%s-%s-%s" % (start_day, start_month,
start_year)
The problem is that when i uncomment this line above, i get the following
error:
'str' object has no attribute 'year'
This is de database model:
Field('start_date', 'date', default=request.now,
requires=[IS_DATE(format=('%d-%m-%Y')), IS_NOT_EMPTY()]),
Field('end_date', 'date', default=request.now,
requires=[IS_DATE(format=('%d-%m-%Y')), IS_NOT_EMPTY()]),
I still not get what it could be.
I hope to hear from any of you soon!
Best regards,
Stefan van den Eertwegh
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.