Hola negrokau.
Cita:
Empezado por negrokau
...
Como multiplicar un dato tipo TIME con un NUMERIC?
|
Respondiendo a esa consulta, la ayuda de Delphi dice:
Cita:
Delphi stores date and time values in the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is fraction of a 24 hour day that has elapsed.
|
Atendiendo a lo anterior, podemos hacer por ejemplo:
Código Delphi
[-]
function HourValue(const Entrada, Salida: TDateTime; const Valor: Double): Double;
begin
Result := Frac(Salida - Entrada) * 24 * Valor;
end;
Y luego usar la función de este modo:
Código Delphi
[-]
with DATAMODULE1.Q_PRUEBA do
FieldValues['MONTO'] := HourValue(FieldValues['HORA1'], FieldValues['HORA2'], PRUEBA.FieldValues['TARIFA']);
Saludos