Diff Date Python. The timedelta class stores the difference between two datetime objects. Print date1 date2 elif date1 date2.
Print date1 date2 else. It takes the date in string format as the input and converts it into python s date format. Print dates are equal get default date time format print datetime datetime now date time1 datetime datetime 2019 7 2 23 15 9 date time2 datetime datetime 2019 7 2 23 15 9 compare date time print date time2 if.
Import datetime get default date format print today is.
Print date1 date2 else. Print date1 date2 elif date1 date2. It takes the date in string format as the input and converts it into python s date format. Split b1 date y1 m1 d1 d2 m2 y2 int x for x in input enter second.