Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python compare timestamps

# importe datetime
from datetime import datetime

# create two datetime
before = datetime(2010, 12, 27, 14, 39, 19, 700401)
after = datetime.now()

# test
if(before>after):
  ...
if(before<after):
  ...
 
PREVIOUS NEXT
Tagged: #python #compare #timestamps
ADD COMMENT
Topic
Name
3+4 =