import datetime
format_string = "%m/%d/%Y %H:%M"
this is the string used to format the dates.
(I assumed you use Month/Day/Year Hour:Minute)
Here is a list with everything you can use.
date_strings = [
"01/01/2018 16:23",
"07/02/2019 16:00",
"05/02/2018 15:00",
"05/02/2019 15:05"
]
this is the input list you can get it diffrent if you want.
dates = []
for date_string in date_strings:
date = datetime.datetime.strptime(date_string, format_string)
dates.append(date)
dates.sort()
dates.reverse()
this will store the dates in date, sort and reverse them (the first is the newest and the last is the oldest).
newest = dates[0].strftime(format_string)
print(newest)
this will print the newest date.
this post covers the same.