Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python datetime without seconds

# Stripping off the seconds in datetime python
dt = datetime.now()
dt = dt.replace(second=0, microsecond=0)
# faster
dt = datetime.now().replace( second= 0, microsecond= 0 )
 
PREVIOUS NEXT
Tagged: #python #datetime #seconds
ADD COMMENT
Topic
Name
9+6 =