start_date = datetime(year=show_year, month=show_month, day=1, hour=0,
minute=0, second=0)
if show_month == 12:
end_date = datetime(year=show_year+1, month=1, day=1, hour=0,
minute=0, second=0)
else:
end_date = datetime(year=show_year, month=show_month+1, day=1,
hour=0, minute=0, second=0)
There are two same queries:
datequery1 = (db.indications.date > start_date)&(db.indications.date <
end_date)
datequery2 =
(db.indications.date.year()==show_year)&(db.indications.date.month()==show_month)
I think, the first is faster. Am I right?