To clarify: - The class-level attribute Member.dateofbirth is not a date/datetime object. It is a instrumented attribute representing a column in the database table behind this model. So it does not have any method called replace.
- Once you get an *instance* of Member, the instance-level attribute dateofbirth will be of python type date/datetime and will have a replace method. - Because this was not clear to you, you should really really go through the introductory tutorial (it's quite good and will bring you up to speed): http://docs.sqlalchemy.org/en/rel_0_8/orm/tutorial.html Gulli On Wed, Aug 28, 2013 at 5:54 PM, Jonathan Vanasco <jonat...@findmeon.com>wrote: > > > On Wednesday, August 28, 2013 12:52:03 PM UTC-4, herzaso wrote: >> >> What's wrong with Member.dateofbirth==datetime.**today() ? >> > datetime.today() is "now" -- or "August 28, 2013 12:52:03 PM UTC-4" > > The OP wants a sql operation that matches the Month+Day of Member.dateofbirth > to the Month+day of today. > > See this thread for how to use `datepart` -- > https://groups.google.com/forum/#!msg/sqlalchemy/PaDkSHA4zcw/xTp1DjVQZOAJ > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.