Help

Coercing data type to number

Solved
Jump to Solution
671 2
cancel
Showing results for 
Search instead for 
Did you mean: 

I’m pulling a numeral out of a string, for example, extracting “27” from “WP27”. Is there a way to coerce that extracted numeral to a number value? I’ve discovered that Airtable throws an #ERROR if I use that extracted value in a math formula like MyExtractedNumber * ItemPrice. I presume that’s because it thinks the value in MyExtractedNumber is “27” and not simply 27, ie a text value and not a number.

There’s a way in Airtable to create a date value from parts but I’ve searched for something like a NUMBER() function and can’t find it. Am I missing something?

William

1 Solution

Accepted Solutions
JonathanBowen
13 - Mars
13 - Mars

Hi @WilliamPorterTech - you could use the VALUE function:

Screenshot 2020-03-30 at 21.17.28

JB

See Solution in Thread

2 Replies 2
JonathanBowen
13 - Mars
13 - Mars

Hi @WilliamPorterTech - you could use the VALUE function:

Screenshot 2020-03-30 at 21.17.28

JB

FANTASTIC! Thank you so much Jonathan.

I did try to find this on my own but couldn’t find it searching on “coerce” or “data type” or just “type” and it didn’t occur to me that it would have the totally opaque name “VALUE”. And I did scroll through the whole list of Number functions but I missed it. Anyway, very glad to know it’s there – and now I can undo the workaround I’d come up with and do what I’m trying to do properly.

Muchas gracias,

William