Coversion String to integer

I am trying to convert any string number into an integer Example like seven to 7 or Five to 5 or Two to 2 can anyone help

1 Like

https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/functions/type-conversion-functions

not getting proper solution

Its not working

Do you need only the numbers 0 - 10? Then a bigger IF cascade could help

1 Like

are you robot

:rofl:
My profile saying like that?.. I shared some links which can give you vb code to develop your requirement. please have a look those links. Hope my inputs are useful.

can you help only for 0-10…my input is One i want output is 1…so as upto 10…input is Ten i want 10

A switch case would do the job, then set a case for each number from one to ten. In the case, set a variable to the digit from 0 to 10.

strNumber is a String
intNumber is an Integer
image

1 Like

if you want to check the variable case-insensitive feel free to use variable.ToLower() as your switch case expression

2 Likes

Good call. May also want to add a .Trim in there too if there is any potential for there to be white space.

image

2 Likes

after run not display any digit

The digit is in the variable “intNumber”

If you want to display it on the screen, use a Message Box activity, with the value as intNumber.ToString

what is datatype of intNumber

strNumber is a String
intNumber is an Integer

Good morning Arun,

Does one of the workflows in the following thread fulfill your need?

1 Like

Hi, @chenderson it is the exact opposite of my task… I am trying word to the number Hope someone could help me

@Arun_Pondhe Is the solution I provided not working?

1 Like

@andrewjames did not work thanks for trying help