Tempo - cálculo de horas trabalhadas |
Top Previous Next |
|
var i:double; s:string; begin QtdeHora.DateTime := (Hora2.DateTime-hora1.DateTime); s := copy(TimeToStr(QtdeHora.DateTime),1,5); s := SubstituiChar(':',',',s); i := StrToFloat(s); i := RoundTo((i * 1.15),-2);// uses math Total.Value := (ValorHora.Value * i);
fiz os testes hora inicial 01:00 hora inicial 02:30 valor hora 20,00 total = 30,00
deu certinho tb com outros valores hehe |