0
I have a string that in case you have "-" I want to only take what is before the "-"
var value = "12345-485" or "7896"
I tried using: value. Substring(0,value. Index("-"));
If the value has "-" right, now if you don’t have the "-" field returns error.