Calcula los días entre dos fechas dadas.
Ejemplo:
1 2 3 4 5 6 7 8 9 |
if tc.RecordCount > 0 then begin if (DaysBetween(Date, tc.ParamByName('Fecha').AsDate) > numeroDias) then begin insertarEventoFicheroLog ('FACTURA', 'Factura vencida' + tc.ParamByName('Numero').AsString); end; end; |
Uses DateUtils;