SolutionNote: NI does not recommend LabVIEW MathScript Module functions for new designs. See www.ni.com/migratemathscript for information and recommended alternatives.
You can convert a string into an integer by using a combination of type conversion functions in the MathScript node, as shown below:
string = '1986'
real_number = real(str_to_num(string))
real_integer = int16(real_number(1))
Below is a screenshot of what this would look like in LabVIEW.