Hi, in my object I have two date fields: date1:fields.date('date 1'), date2:fields.date('date 2'),
I want to retrieve the difference of that 2 fields I tried this : date2 - date1 but I got this error : TypeError: unsupported operand type(s) for -: 'str' and 'str'
to do this, the first you must convert into date format (use lib datetime: datetime.date(year, month, day)). Then you can use operator '-' in this case. Refer: http://docs.python.org/2/library/datetime.html
thank you !