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