PEP 321: Date/Time Parsing and Formatting

A.M. Kuchling amk at
Thu Nov 20 02:16:05 CET 2003

On Wed, 19 Nov 2003 18:42:58 +0100, 
	Gerrit Holl <gerrit at> wrote:
>> date.strptime(..., '1992-10-15 12:05:32')?  Does it raise an exception? Does
>> it silently ignore the time data?  Or is it illegal to use time-related
>> specifiers such as %H with date.strptime, or date-related ones such as %m
>> with time.strptime?
> I don't see the difference between the first and the last one. I am for

First one:
date.strptime(..., '1992-10-15 12:05:32') -> ValueError: time value ignored

Third one:
date.strptime('... %H:%M:%S', '1992-10-15') -> ValueError: can't use %H


More information about the Python-list mailing list