Nikhil Verma wrote: > I have a list :- > L = ['Sunday November 11 2012 9:00pm ', 'Thursday November 15 2012 > 7:00pm ',\
[...] > 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. Your date strings have trailing whitespace, try changing the format to final_event_time = [datetime.strptime(s, '%A %B %d %Y %I:%M%p ') for s in L] or apply strip to the date strings: final_event_time = [datetime.strptime(s.strip(), '%A %B %d %Y %I:%M%p') for s in L] -- http://mail.python.org/mailman/listinfo/python-list