Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove minutes and seconds from datetime python

old_date = datetime.datetime(2011, 3, 23, 16, 45)
new_date = old_date.replace(minute=0, second=0) + datetime.timedelta(hours=1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #minutes #seconds #datetime #python
ADD COMMENT
Topic
Name
6+8 =