Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

compare datetime string python

>>> from datetime import datetime as dt
>>> a = dt.strptime("10/12/13", "%m/%d/%y")
>>> b = dt.strptime("10/15/13", "%m/%d/%y")
>>> a > b
False
>>> a < b
True
>>>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #datetime #string #python
ADD COMMENT
Topic
Name
2+2 =