Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #32944 > unrolled thread

Re: Unconverted data remains

Started byMRAB <python@mrabarnett.plus.com>
First post2012-11-08 12:56 +0000
Last post2012-11-08 12:56 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Unconverted data remains MRAB <python@mrabarnett.plus.com> - 2012-11-08 12:56 +0000

#32944 — Re: Unconverted data remains

FromMRAB <python@mrabarnett.plus.com>
Date2012-11-08 12:56 +0000
SubjectRe: Unconverted data remains
Message-ID<mailman.3431.1352379375.27098.python-list@python.org>
On 2012-11-08 08:04, Nikhil Verma wrote:
> Hi
>
> My Problem
>
>
> I have a list :-
>   L = ['Sunday November 11  2012 9:00pm ', 'Thursday November 15  2012
> 7:00pm ',\
>                   'Friday November 16  2012 7:00pm ', 'Monday November
> 19  2012 7:30pm ', \
>                   'Friday November 23  2012 7:30pm ', 'Sunday November
> 25  2012 8:00pm ',\
>                   'Monday November 262012 7:00pm ', 'Thursday November
> 29  2012 6:30pm ',\
>                   'Saturday December 1  20125:30pm ', 'Thursday December
> 6  2012 9:00pm ',\
>                   'Sunday December 9  2012 7:00pm ', 'Friday November 9
>   2012 6:00pm ', \
>                   'Friday November 9  2012 7:00pm ', 'Friday November 9
>   2012 7:00pm ']
>
> final_event_time = [datetime.strptime(iterable, '%A %B %d %Y %I:%M%p')
> for iterable in L]
>
> and having this error Unconverted data remains . I am trying to convert
> all these in datetime object.
>
It's complaining about the trailing space in the strings. Try removing
it.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web