cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Is_number() equivalent

Mari
New Contributor

i am getting the input value from the flat file. i am reading all the column values and have to load in the target table only if it is a number. Can i know is there any built-in function to validate or handle this.

3 REPLIES 3

cjhoward18
Employee
Employee

Hi @Mari

The isNan() function can tell you if the value is a number or not. Usage is like this:

isNaN(โ€œ4โ€) = false

isNaN(โ€œfooโ€) = true

you can then use parseInt(โ€œ4โ€) to get the number 4 if needed

Mari
New Contributor

Thanks. It helps.