user308827 user308827 - 1 year ago 84
Python Question

Convert python abbreviated month name to full name

How can I convert an abbreviated month anme e.g.

Apr
in python to the full name?

Answer Source

If you insist on using datetime as per your tags, you can convert the short version of the month to a datetime object, then reformat it with the full name:

import datetime
datetime.datetime.strptime('apr','%b').strftime('%B')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download