NumberFormat

Smee

Well-Known Member
Licensed User
Longtime User
I have the following code to format a number as currency but it does not seem very elegant. Is there a better way?

Price= Reader.GetValue(0)*Qty
Dp=StrIndexOf(Price, ".",0)
If StrLength(Price)-StrIndexOf(Price, ".",0) = 2 Then
Price=Price & "0"
Else If DP=-1 Then
Price=Price & ".00"
End If
lblPrice.Text="$" & Price

Thanks all

Joe
 

Smee

Well-Known Member
Licensed User
Longtime User
Andrew,

Thanks for the reply

:sign0161::sign0137::sign0148:

What else can i say?

Joe
 
Top