S sultan87 Active Member Licensed User Longtime User Jan 31, 2014 #1 Hello I want to format a field example for i = 1 to 15 = 1 if text = "01" i if = 9 text = "09" i if = 13 text = "13" i something like in vb text = Format (i, "00") Best regards
Hello I want to format a field example for i = 1 to 15 = 1 if text = "01" i if = 9 text = "09" i if = 13 text = "13" i something like in vb text = Format (i, "00") Best regards
stevel05 Expert Licensed User Longtime User Jan 31, 2014 #2 Search the forum for NumberFormat / NumberFormat2 Upvote 0
M Mahares Expert Licensed User Longtime User Jan 31, 2014 #3 This is to follow up with Steve's tip: Code: Copy For i=1 To 15 Log(FormatNumber(i, 2, 0 )) Next Sub FormatNumber(x As Int, MinInt As Int, MaxFrac As Int ) As String Return NumberFormat(x,MinInt,MaxFrac) End Sub Upvote 0
This is to follow up with Steve's tip: Code: Copy For i=1 To 15 Log(FormatNumber(i, 2, 0 )) Next Sub FormatNumber(x As Int, MinInt As Int, MaxFrac As Int ) As String Return NumberFormat(x,MinInt,MaxFrac) End Sub
S sultan87 Active Member Licensed User Longtime User Jan 31, 2014 #4 Mahares said: This is to follow up with Steve's tip: Code: Copy For i=1 To 15 Log(FormatNumber(i, 2, 0 )) Next Sub FormatNumber(x As Int, MinInt As Int, MaxFrac As Int ) As String Return NumberFormat(x,MinInt,MaxFrac) End Sub Click to expand... thank you to both Upvote 0
Mahares said: This is to follow up with Steve's tip: Code: Copy For i=1 To 15 Log(FormatNumber(i, 2, 0 )) Next Sub FormatNumber(x As Int, MinInt As Int, MaxFrac As Int ) As String Return NumberFormat(x,MinInt,MaxFrac) End Sub Click to expand... thank you to both