remove minutes and seconds from datetime python

Solutions on MaxInterview for remove minutes and seconds from datetime python by the best coders in the world

showing results for - "remove minutes and seconds from datetime python"
Remy
20 Oct 2017
1old_date = datetime.datetime(2011, 3, 23, 16, 45)
2new_date = old_date.replace(minute=0, second=0) + datetime.timedelta(hours=1)
3