Ver Mensaje Individual
  #2  
Antiguo 10-08-2005
Avatar de barman
barman barman is offline
Miembro
 
Registrado: may 2003
Posts: 139
Reputación: 21
barman Va por buen camino
Fale, haces doble click en TTable (TIBTable, TQuery, etc) , add field, indicas el tipo de campo y le dices que es calculado.

habres el evento OnCalcField
TTable ->Events ->OnCalcField


void __fastcall TForm1::Table1CalcFields(TDataSet *DataSet)
{

DataSet ->FieldByName("MIFECHA") ->AsDateTime =
DataSet ->FieldByName("DESDEFECHA") ->AsDateTime
-
DataSet ->FieldByName("HASTAFECHA") ->AsDateTime;


}


Prueba las funciones diftime, encodetime, etc.
Responder Con Cita