Write a Python program to calculate number of days between two dates.
Topic: Write a Python program to calculate number of days between two dates.
Solution
from datetime import date f_date = date(2019, 4, 15) # YYYY/MM/DD l_date = date(2020, 4, 15) # YYYY/MM/DD delta = l_date - f_date print(f'No of days between {f_date} and {l_date} is:{delta.days}')
List all Python Programs