Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

subtract one hour from datetime python

from datetime import datetime, timedelta

d = datetime.today() - timedelta(hours=0, minutes=50)

d.strftime('%H:%M %p')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #subtract #hour #datetime #python
ADD COMMENT
Topic
Name
9+4 =