Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

compare times python

#Check if now is before or after 8am:
now = datetime.datetime.now()
today8am = now.replace(hour=8, minute=0, second=0, microsecond=0)
#Perform the checks:
if (now < today8am):
  ...
if (now == today8am):
  ...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #times #python
ADD COMMENT
Topic
Name
1+8 =