Ver Mensaje Individual
  #2  
Antiguo 18-10-2004
Avatar de Investment
Investment Investment is offline
Miembro
 
Registrado: may 2003
Posts: 378
Reputación: 22
Investment Va por buen camino
Código:
//CadenaFloat, ParteEntera y ParteDecimal son de tipo string 

CadenaFloat:= floattostr(Tuvariablefloat); 
ParteEntera:= copy(CadenaFloat,0,pos(',',CadenaFloat)-1);
ParteDecimal:= copy(CadenaFloat,pos(',',CadenaFloat)+1,length(CadenaFloat)); 

if Len(ParteDecimal)>2 then
  ParteDecimal:= Copy(ParteDecimal,1,2); //Ya tienes solo dos decimales
__________________
Saludos,
Peter Investment
Responder Con Cita