I'm using Web2py (Python), doing the query using DAL I wonder if it's possible to get the difference in days, something close to that
Example
#!/usr/bin/env python
# -*- coding: utf-8 -*-
resultado = db(
(db.base_suporte.dt_solicitacao - db.base_suporte.dt_fechamento) >5
).select(db.base_suporte.dt_solicitacao)
out of curiosity the return of this query is
SELECT base_suporte.dt_solicitacao FROM base_suporte WHERE (
(base_suporte.dt_solicitacao - base_suporte.dt_fechamento) > 5.0);
I know how to do this using own commands from each database using db.executesql () , but would like a solution using the DAL engine so that it can maintain compatibility with other
I am using the individual processing of records as a workaround.