Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python datetime now minus 3 hours

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: #python #datetime #hours
ADD COMMENT
Topic
Name
8+8 =