i know you can do math in strings like int() format() and stuff like that..
what other string functions are there?
how do i get a string to show insted of 14567.166666666666
only 14567.16 or 1.66 (and not with [format #####.##])
Printable View
i know you can do math in strings like int() format() and stuff like that..
what other string functions are there?
how do i get a string to show insted of 14567.166666666666
only 14567.16 or 1.66 (and not with [format #####.##])
If you have VB6, use the Round() function, i.e.Code:nRounded = Round(14567.166666666666, 2)
...and if you don't have VB6 you can use this function.
Code:Public Function Round(dblValue, intPlaces) As Double
Round = (Int((dblValue * 10 ^ intPlaces) + 0.5)) / 10 ^ intPlaces
End Function