Hi All,
I want to take a specific value from the string.
Actual value for the string is “2019-11”, and i need to take only 19 and 11 from it. is there any way to do it.
Hi All,
I want to take a specific value from the string.
Actual value for the string is “2019-11”, and i need to take only 19 and 11 from it. is there any way to do it.
Nope
Hi @Manikandasamy
Is that the value that we need to get ? The value before and after of “-” am i correct?
cheers
Happy learning
Partially correct,
before “-” i need to take only 19 (from 2019 to 19)
Try this, This will return 2019-11, if you need only 10-11 then use strInput.IndexOf(“-”)-2,4 in the below line of code. Here strinput is the string you have mentioned.
strInput.Substring( strInput.IndexOf("-")-4,7)
Thanks a lott for your support.
i used the below method to get it.
SUBSTRING | ||
---|---|---|
Example 1 | ||
Takes content 5 characters from the first character from the left (0) | ||
Variable name | = | text |
Variable type | = | String |
New Variable name | = | new_text |
Variable type | = | String |
text | = | Hello World Its Me |
Assign: | ||
new_text | = | text.Substring(0, 5) |
Write Line: | ||
new_text | ||
Result (Write Line) | : | Hello |
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.