Write a python function to calculate number of days between two dates using datetime module


Topic: Write a python function to calculate number of days between two dates using datetime module

Solution

from datetime import date
def day_diff(date1, date2):
    diff = date1 - date2
    return diff.days



List all Python Programs