subtract one hour from datetime python

Solutions on MaxInterview for subtract one hour from datetime python by the best coders in the world

showing results for - "subtract one hour from datetime python"
Lia
29 Jun 2019
1from datetime import datetime, timedelta
2
3d = datetime.today() - timedelta(hours=0, minutes=50)
4
5d.strftime('%H:%M %p')
6