resolution()
resolution() : Returns the minimum difference between two non equal date objects .
from datetime import date
dt=date.today().resolution
print(dt))
Output
1 day, 0:00:00
Date with time
from datetime import datetime
dt=datetime.now().resolution
print(dt)
Output
0:00:00.000001
Using date object
import datetime
# Year, Month, date, Hour, Minute , Second, microsecond
dt=datetime.datetime(2019,12,31,23,59,59,345234)
print(dt.resolution)
Output
0:00:00.000001
« All Date Objects
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com
plus2net.com