STRINGTONUMBER(String Expression or Text Variable)

Numeric Expression

Returns the numeric portion of the string expression or Text type variable.

Examples:

TxtVar=”516” StringToNumber(TxtVar) returns 516

TxtVar=”10/25/2016” StringToNumber(TxtVar) returns 10

TxtVar=”5 times” StringToNumber(TxtVar) returns 5

TxtVar=”hello” StringToNumber(TxtVar) returns -1, [Undefined],min=0,max=1

TxtVar=”round 5” StringToNumber(TxtVar) returns -1, [Undefined],min=0,max=1

Tip: If the string argument contains digits and letters, the function will stop processing when it detects the first non-numeric character. If the string starts with a minus sign, the function returns a negative value, and if the string contains a decimal point, the string will return a floating point value.