Answers for "remove minutes and seconds from datetime python"

0

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)
Posted by: Guest on August-17-2021

Code answers related to "remove minutes and seconds from datetime python"

Python Answers by Framework

Browse Popular Code Answers by Language