On Monday, February 16, 2015 at 12:35:00 PM UTC-6, Travis VanDame wrote:
> I'm new to python and peewee and was looking for an example on how to query a 
> mysql table with a datetime column only returning rows that are 30 days old.

Well this is what I've come up with....

   @classmethod
    def get_archive_xml(cls, day_count):
        return cls.select().where(cls.created + 
datetime.timedelta(days=int(day_count)) >= datetime.date.today())
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to