'date_from':fields.datetime('Date From'),
'date_to':fields.datetime('Date To'),
d_frm_obj = datetime.datetime.strptime(date_from, DEFAULT_SERVER_DATETIME_FORMAT)
d_to_obj = datetime.datetime.strptime(date_to, DEFAULT_SERVER_DATETIME_FORMAT)
temp_date = d_to_obj-d_frm_obj.hours (This got errors)
From the above code How to find out the number of hours between these two objects...need a help
Hi, Just write down as like below. *temp_date = d_to_obj-d_frm_obj* *diff_in_sec = temp_date.total_seconds()* *diff_in_hours = diff_in_sec / 60* I hope you will get the difference.
Thanks EMI........