On 6 July, 10:55, AlienBaby <matt.j.war...@gmail.com> wrote:
> Hi,
>
> I'm using datetime.strptime(string,format) to convert dates parsed
> from a file into datetime objects.
>
> However, the files come from various places around the world, and
> strptime fails when non-english month names are used.
>
> strptime says it converts month names using the current locales
> version of the name.  I've looked into the locale module but can't see
> how I would setup.change a locales date/time representations, I can
> only see categories related to decimal number / currency
> representations.
>
> Can anyone show how I could change the locale such that strptime could
> parse a date string that used say, German month names?
>
> Thankyou

I just solved this I believe. I didnt spot LC_ALL or LC_TIME
previously.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to