how to rewrite minute in datetime python

Solutions on MaxInterview for how to rewrite minute in datetime python by the best coders in the world

showing results for - "how to rewrite minute in datetime python"
Yanis
12 Feb 2020
1from datetime import datetime
2date = datetime.strptime('26 Sep 2012', '%d %b %Y')
3newdate = date.replace(hour=11, minute=59)
4