comparing datetime with date
graeme.matthew at contrado.com.au
Wed Sep 15 02:36:47 CEST 2004
yes it was late, apologies therefore a simple way to solve this problem
str(x) == str(y)
"Sam Holden" <sholden at flexal.cs.usyd.edu.au> wrote in message
news:slrnckf3e5.ptn.sholden at flexal.cs.usyd.edu.au...
> On Wed, 15 Sep 2004 09:24:03 +1000,
> Graeme Matthew <graeme.matthew at contrado.com.au> wrote:
>> This is very interesting because if you continue further and coerce both
>> strings you get:
>>>>> print str(y) == str(y)
> Of course if you actually do:
>>>>> print str(x) == str(y)
>> '2004-09-14 06:43:15'
>> Even though there string values are different they still match?
> No, they only matched becuase you compared y with y :)
> Sam Holden
More information about the Python-list