I was facing one automation problem, can anyone guide us on below -
Basically there is a String for eg =“abc”
We have to change the length of this to 8
eg output we need = “000000abc”
Eg 2 input str = “abcd”
output = “00000abcd”
Can anyone suggest some solution or some good way.
you can try str.PadLeft(8,"0"c)
You can specify the number to add to the length of your value to make it dynamic.
You can refer to the below post.
str_input - input variable
str_output- output variable
str_output = IF(str_input.Length<8,str_input.Insert(0,“0”).ToString,str_input.ToString)
stringVar = stringVar.ToString(“D8”)
try this one
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.