Obtiene el año en entero (integer) de una fecha dada (datetime).
Ejemplo de uso:
1 2 3 4 5 6 7 8 9 10 |
while not tConsulta.Eof do begin tbPrincipal.Insert; tbPrincipalMINISTERIO.AsString := ministerio; tbPrincipalN_Referencia.AsString := tConsultaFINALREF.AsString; tbPrincipalFecha.AsDateTime := tConsultaFECADJUDICACION.AsDateTime; tbPrincipalEjercicio.AsInteger := yearof (tConsultaFECADJUDICACION.AsDateTime); tbPrincipal.post; tConsulta.next; end; |
Uses DateUtils;