Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

converting month number to month name python

months_in_year = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
date = '2021-11-21 11:22:03'
month = date.dt.month
print(month)
#Output
11

month_name = months_in_year [month - 1]
print(month_name)
#Output
November
 
PREVIOUS NEXT
Tagged: #converting #month #number #month #python
ADD COMMENT
Topic
Name
1+6 =