Ver Mensaje Individual
  #3  
Antiguo 28-06-2019
javicho_villa javicho_villa is offline
Miembro
 
Registrado: feb 2005
Ubicación: Lima - Perú
Posts: 99
Reputación: 20
javicho_villa Va por buen camino
Smile Muchas gracias Caminante

ante todo gracias por tomarse el tiempo en leer y ayudarme.

lo he probado en BeforeOpen pero da error
Código Delphi [-]
procedure TGuiaForm.CabeceraADOQueryBeforeOpen(DataSet: TDataSet);
var F:TDateField;
begin
    F:=Datos.DatosDM.CabeceraADOQuery.FieldByName('Fecha')as TDateField;
    F.DisplayFormat:='dd/mm/yyyy';
  //TDateTimeField(CabeceraADOQueryFecha.Value).DisplayFormat := 'DD/MM/YYYY';
  //TDateField(self.CabeceraADOQueryFecha).DisplayFormat := 'DD/MM/YYYY'
  //(CabeceraADOQuery.FieldByName('Fecha') as TDateTimeField).DisplayFormat := 'DD/MM/YYYY';
end;

Tambien lo probe en un evento de un boton donde inicializo el query pero tambien sale error: CabeceraAdoQuery: Field 'Fecha' not found, este error sale en los dos eventos.

Código Delphi [-]
  with self.CabeceraADOQuery do
    begin
      Close;
      SQL.Clear;
      SQL.Add(Cad);
      ExecSQL;
      Active := true;
      Last;
    end;
    //(CabeceraADOQueryFecha as TDateTimeField).DisplayFormat := 'dd/mm/yyyy';

    //TDateTimeField(CabeceraADOQuery.FieldByName('Fecha')).DisplayFormat := 'dd/mm/yyyy';

    //TDateTimeField(CabeceraADOQueryFecha.Value).DisplayFormat := 'DD/MM/YYYY';
    F:=Datos.DatosDM.CabeceraADOQuery.FieldByName('Fecha')as TDateField;
    F.DisplayFormat:='dd/mm/yyyy';
__________________
Javier Villa Sánchez
jvilla@andreaproducciones.com

Última edición por javicho_villa fecha: 28-06-2019 a las 22:15:08.
Responder Con Cita