How do I convert String into Date object

MrPink tdsimpson at
Sun Aug 14 07:44:32 CEST 2011

I found this solution.

Python: Convert String Date to Date Object

On Aug 13, 3:14 pm, MrPink <tdsimp... at> wrote:
> Is this the correct way to convert a String into a Date?
> I only have dates and no time.
> import time, datetime
> oDate = time.strptime('07/27/2011', '%m/%d/%Y')
> print oDate
> Thanks,

More information about the Python-list mailing list