Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

the month before python dateime

 import datetime
 today = datetime.date.today()
 first = today.replace(day=1)
 lastMonth = first - datetime.timedelta(days=1)
 print(lastMonth.strftime("%Y%m"))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #month #python #dateime
ADD COMMENT
Topic
Name
9+1 =