Rajeev Rajeev - 1 year ago 112
Python Question

Get month name from number

How can I get the month name from the month number?

For instance, if I have

, I want to return


How to get the string

Answer Source

Calendar API

From that you can see that calendar.month_name[3] would return March, and the array index of 0 is the empty string, so there's no need to worry about zero-indexing either.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download