jars
02-03-2004, 18:10:06
Hola a todos:
Disculpen el primer mensaje, no conocía los formatos.
Trabajo con Delphi 7 y Firebird 1.5.
He creado la siguiente función en una UDF:
function SecsToFmt(secs: Integer): PChar; cdecl; export;
var
hh,mm: Integer;
begin
try
hh := Trunc(secs/3600);
secs := secs Mod 3600;
mm := Trunc(secs/60);
secs := secs Mod 60;
Result := PChar(Format('%.2d:%.2d:%.2d',[hh,mm,secs]));
except
Result := PChar(Format('%d',[secs]));
end;
end;
La llamo desde IbExpert de la siguiente manera:
select secstofmt(140) from ....
Me sale el error:
arithmetic overflow or division by zero has occurred.
arithmetic exception, numeric overflow,or string truncation
Alguien me puede decir que esta mal?
Gracias.
Disculpen el primer mensaje, no conocía los formatos.
Trabajo con Delphi 7 y Firebird 1.5.
He creado la siguiente función en una UDF:
function SecsToFmt(secs: Integer): PChar; cdecl; export;
var
hh,mm: Integer;
begin
try
hh := Trunc(secs/3600);
secs := secs Mod 3600;
mm := Trunc(secs/60);
secs := secs Mod 60;
Result := PChar(Format('%.2d:%.2d:%.2d',[hh,mm,secs]));
except
Result := PChar(Format('%d',[secs]));
end;
end;
La llamo desde IbExpert de la siguiente manera:
select secstofmt(140) from ....
Me sale el error:
arithmetic overflow or division by zero has occurred.
arithmetic exception, numeric overflow,or string truncation
Alguien me puede decir que esta mal?
Gracias.