To fix other data-type errors, it is useful to understand and know where to use the various built-in functions to manipulate string variables or change them back to numbers or dates.
Use the toString() function, the toDate(), or the toLong() functions to accomplish this.
You might receive an error saying something like “Expected LongInt and found string….” or something like that. Then, you can use the toLong() to change it to a number data type.
For your convenience, here’s the page listing all the built-in functions. Consider bookmarking it!