Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get first day of year

import datetime
today = datetime.datetime.now()
thisYear = today.year
firstDay = datetime.datetime(thisYear, 1, 1)
firstDayStr = firstDay.strftime('%Y')
 
PREVIOUS NEXT
Tagged: #python #day #year
ADD COMMENT
Topic
Name
2+7 =