strtotime?

Leif K-Brooks eurleif at ecritters.biz
Thu Jan 22 19:02:15 EST 2004


Irmen de Jong wrote:
>> PHP has a very nice strtotime function (http://php.net/strtotime) 
>> which converts a date/time in virtually any format into a timestamp. 
>> Does Python have a similar function?
> 
> I guess you're looking for:  time.strptime

Thanks, but no. PHP's strtotime() function magically guesses the format 
on its own, time.strptime() just uses a fixed format.




More information about the Python-list mailing list