How can I find the difference between dates in two fields?
How do I find the difference between 2 dates?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How can I find the difference between dates in two fields?
How do I find the difference between 2 dates?
Hi,
You can refer to this code and modify it according to your field requirements.
from datetime import datetime
start_date = self.start_date
end_date = self.end_date
difference_days = (end_date - start_date).days
years = difference_days / 365.25
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up