Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

phyton datetime comparison

# date in yyyy/mm/dd format
d1 = datetime.datetime(2018, 5, 3)
d2 = datetime.datetime(2018, 6, 1)
  
# Comparing the dates will return
# either True or False
print("d1 is greater than d2 : ", d1 > d2)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #phyton #datetime #comparison
ADD COMMENT
Topic
Name
1+4 =