less than date query sqlachemy

Solutions on MaxInterview for less than date query sqlachemy by the best coders in the world

showing results for - "less than date query sqlachemy"
María Paula
11 Oct 2018
1current_time = datetime.datetime.utcnow()
2
3ten_weeks_ago = current_time - datetime.timedelta(weeks=10)
4
5subjects_within_the_last_ten_weeks = session.query(Subject).filter(
6    Subject.time > ten_weeks_ago).all()