Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

compare dates in python

    jan_1_2020 = datetime.datetime(2020, 1, 1)
    dec_12_2020 = datetime.datetime(2020, 12, 12)

    if (jan_1_2020 < dec_12_2020):
        print("first datetime is less than the second")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #dates #python
ADD COMMENT
Topic
Name
7+9 =