max() min()

Date

max() : Maximum representable date
min() : Minimum representable date
from datetime import datetime
dt=datetime(2019,12,31)
print(dt.min)
print(dt.max)
Output
0001-01-01 00:00:00
9999-12-31 23:59:59.999999

Using a list

my_date=['2021-03-23','2019-04-15','2021-07-26','2019-12-22']
print(min(my_date)) # 2019-04-15
print(max(my_date)) # 2021-07-26
All Date Objects
Subscribe to our YouTube Channel here

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2022 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer