max() min()
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
« All Date Objects
This article is written by plus2net.com team.
plus2net.com