Decrementar hora?

Delphi

18/05/2003

[b:443c1b24c8] Como faço para decrementar um campo hora em paradox
por ex.:

X:= horaI - HoraF;

sendo que a hora esta sendo gravada com o tipo time.[/b:443c1b24c8]


Guigao

Guigao

Curtidas 0

Respostas

Chacal81

Chacal81

18/05/2003

supondo que temos 3 dbedits.
1 recebe hora inicial
2 recebe hora final



var

x:=time
horaini: time;
horafim: time;

begin

horaini:= strtotime(dbedit1.text);
horafim:= strtotime(dbedit2.text);

x:= (horafim - horaini);

dbedit3.text:= timetostr(x);

end;

end.


GOSTEI 0
POSTAR