hi Samuel - a DateTime, meaning a sqlalchemy.types.DateTime ? thats not a date- holding object, its a TypeEngine object which describes a date-holding database column. from the code sample below I dont see how that could be returned since res.fetchone().changed would be the actual contents of a result-row column named "changed".
if we're talking about mxDateTime or simlar I'd ask what DBAPI youre using. On Nov 30, 2007, at 3:38 PM, Samuel wrote: > > Hi, > > I haven't found this in the list archives or the docs: How do you > convert between DateTime and datetime.datetime objects? In particular, > I am trying to do the following: > > last_change = res.fetchone().changed # this returns a DateTime object > test = last_change < datetime.datetime.now() > > TypeError: can't compare datetime.datetime to DateTime > > -Samuel > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---