how to subtract 48 hours from datetime filed in python without using pandas

Solutions on MaxInterview for how to subtract 48 hours from datetime filed in python without using pandas by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "how to subtract 48 hours from datetime filed in python without using pandas"
Alessandra
10 Sep 2018
1from datetime import datetime, timedelta
2
3d = datetime.today() - timedelta(hours=0, minutes=50)
4
5d.strftime('%H:%M %p')
6