Convertir numero entero a porcentaje

HMG en Español

Moderator: Rathinagiri

Post Reply
jparada
Posts: 430
Joined: Fri Jan 23, 2009 5:18 pm

Convertir numero entero a porcentaje

Post by jparada »

Hola,

Hay alguna función que convierta números enteros (decimal) a porcentaje?, lo realizo así, pero no sé si hay alguna función:

Code: Select all

tempVal := 0.02 * (ventaTotal/objetivoVenta)
tempVal1 := Round(tempVal * 100,1)
Saludos,
Javier
gisjr134
Posts: 44
Joined: Tue Dec 08, 2020 11:37 am
DBs Used: DBF,MySQL,PostgreSQL
Location: Brasil
Contact:

Re: Convertir numero entero a porcentaje

Post by gisjr134 »

Ola,


cPercent := Alltrim(Str( tempVal1 , 5,2)) + "%" , 2 Casas decimais.

cPercent := Alltrim(Str( Int(tempVal1) )) + "%" , Inteiro.



Espero ter ajudado.
Post Reply