Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

compare dates python

import datetime

today = datetime.date.today()

tomorow = today + datetime.timedelta(days=1)

1dayTimedelta = today - tomorow

result = 1dayTimedelta.total_seconds()
#the difference in seconds
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #dates #python
ADD COMMENT
Topic
Name
5+3 =