Hello Everyone,
I get values in percentage (%) but without the percentage sign in SQL and I use that number in Vb.net forms.
The number has a lot of 0 digits so I use this code to reduce it :
LabelPercentage.Text = FormatNumber(LabelPercentage.Text, 2,)
What I need now is how to insert into the number the % sign?
I used this code to change the values from positive to negative and also to insert the percentage but it does not work. Here is the code :
If LabelPercentage.Text < 0 Then
LabelPercentage.Text = (Convert.ToDecimal(LabelPercentage.Text.Trim().Replace("-", "+").Replace(" ", "%")))
LabelPercentage.ForeColor = Color.DarkGreen
Else
LabelPercentage.Text = (Convert.ToDecimal(LabelPercentage.Text.Trim().Replace(" ", "-").Replace(" ", "%")))
LabelPercentage.ForeColor = Color.DarkRed
End If
Thank you Best Regards, Elvis