Ver Mensaje Individual
  #4  
Antiguo 05-09-2005
Avatar de vtdeleon
vtdeleon vtdeleon is offline
Miembro
 
Registrado: abr 2004
Ubicación: RD & USA
Posts: 3.236
Reputación: 24
vtdeleon Va por buen camino
Saludos

Puedes usar en SQL Extratc()
Código Delphi [-]
 with query do begin
 ....
 //*A~o*
   sql.Add('select Fecha from tabla');
   sql.Add('where Extract(year from Fecha)=:fecha1');
 //*Mes*
   sql.Add('select Fecha from tabla');
   sql.Add('where Extract(month from Fecha)=:fecha1');
 ....
 //A~o
   ParamByName('fecha1').AsInteger:=MonthOf(vfech.Date);
 //o Mes
   ParamByName('fecha1').AsInteger:=YearOf(vfech.Date);
 ....
__________________
Van Troi De León
(Not) Guía, Code vB:=Delphi-SQL, ¿Cómo?
Viajar en el tiempo no es teóricamente posible, pues si lo fuera, ya estarían aqui contándonos al respecto!
Responder Con Cita