Ver Mensaje Individual
  #2  
Antiguo 16-09-2013
DOS DOS is offline
Miembro
NULL
 
Registrado: jul 2011
Posts: 173
Reputación: 13
DOS Va por buen camino
Estuve realizando algunos cambios.
Código Delphi [-]
function EncodeTime( Hour, Min: Word ): TDateTime; // es necesario poner segundos?
begin
Tiempo:=EncodeTime( h1, m1 );
end; 

procedure TForm20.horaminutos; //procedimiento para sumar la hora y los minutos
 begin
 h:=ComboBox3.Text;
 m:=ComboBox2.Text;
  h1:=strToInt(h);
  m1:=StrToInt(m);
end;

este es el boton de guardar
Código Delphi [-]
  // guarda turno
procedure TForm20.BitBtn4Click(Sender: TObject);
begin
horaminutos; // llama al procedimiento
DBEdit4.SetFocus;
  table1.FieldByName('Cod_turnovet').AsInteger:=c;
  if table2.FieldByName('Cod_prop').AsInteger=Table3.FieldByName('Cod_prop').AsInteger
  then
  table1.FieldByName('Cod_propi').AsInteger:=Table3.FieldByName('Cod_prop').AsInteger;
  Table1Hora.AsDateTime:=tiempo;
  table1.Post;
end;
El asunto que cuando corre la hora queda en 00:00:00
Responder Con Cita