Number to string formatting

DazRacing

Member
Licensed User
Longtime User
Hi,

Is there a function to convert a number to a string but with formatting? I've searched the Help and this forum but can't seem to see anything.

For example: I'd like to be able to convert an integer to a string but format it with something like "ZZZZ9" so it has zero supression.

Thanks in advance... :sign0085:
 

DazRacing

Member
Licensed User
Longtime User
Hi kickaha,

Many thanks for your reply...

Are you saying that setting the MinimumIntegers parameter to 0 will have the same effect as a formatting string of "ZZZZ" for example?

Thanks...

NumberFormat (Number As Double, MinimumIntegers As Int, MaximumFractions As Int) As String
Converts the specified number to a string.
The string will include at least Minimum Integers and at most Maximum Fractions digits.
Example:
Log(NumberFormat(12345.6789, 0, 2)) '"12,345.68"
Log(NumberFormat(1, 3 ,0)) '"001"
NumberFormat2 (Number As Double, MinimumIntegers As Int, MaximumFractions As Int, MinimumFractions As Int, GroupingUsed As Boolean) As String
Converts the specified number to a string.
The string will include at least Minimum Integers, at most Maximum Fractions digits and at least Minimum Fractions digits.
GroupingUsed - Determines whether to group every three integers.
Example:
Log(NumberFormat2(12345.67, 0, 3, 3, false)) '"12345.670"
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Not sure what you mean, you could post the numbers and the result you want here and I can advise.

Alternatively why not just try it out!
 
Upvote 0
Top