user308827 user308827 - 1 month ago 6
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

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')