[Tutor] Datetime objects

2012-03-16 Thread Luke Thomas Mergner
Hi, I am having trouble comparing two datetime objects. Using Sqlalchemy I save a string as a date into an sqlite field (which has no native date format, I gather). import datetime as dt date_obj = dt.datetime.strptime(date_string,'%m.%d.%Y') I want to compare that date later with an

Re: [Tutor] Datetime objects

2012-03-16 Thread Steven D'Aprano
Luke Thomas Mergner wrote: Hi, I am having trouble comparing two datetime objects. No you're not. You're having trouble comparing a datetime and a date object. [...] But when I compare them, it always returns false because datetime.date does not seem to compare to datetime.datetime... Use