Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
The Question has been closed for reason: duplicate questionby
my time format is '%Y-%m-%d %H:%M:%S'
start_time = 2014-12-04 08:10:32
end_time = 2014-12-04 12:34:45
Here i want output like diff_time = 4.24
Thanks in advance...
from datetime import datetime
fmt = '%Y-%m-%d %H:%M:%S'
d1 = datetime.strptime('2014-12-04 08:10:32',fmt) #start date
d2=datetime.strptime('2014-12-04 12:34:45',fmt) #end date
diff=d2-d1 #calculate difference between start-end date
final output=total seconds/3600.0 #convert total seconds into hours Difference in float format
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/4/14, 4:39 AM|
|Seen: 12975 times|
|Last updated: 3/16/15, 8:10 AM|