NUMBER()

Number from any value

Returns the Integer equivalent of a value if a recognizable number, or 0 if not. If blank (that is, "" ), returns a blank Number value.

Sample usage

NUMBER(4.4)  returns  4 (rounded down) Equivalent to FLOOR(4.4) or ROUND(4.4) ). See also: FLOOR() , ROUND()

NUMBER(4.5) returns  4 (rounded down) Equivalent to FLOOR(4.5) ).

NUMBER(4.6) returns  5 (rounded up) Equivalent to CEILING(4.6) or ROUND(4.6) ). See also: CEILING() , ROUND()

NUMBER(4.8) : 5 (rounded up)

NUMBER("4.2") returns  0 . AppSheet recognizes quoted raw text values in certain formats as Date , DateTime , or Time values. In this example "4.2" is recognized as the date, April 2 (of the current year). A Date value has no Number equivalent, so 0 is returned. This (mis-)interpretation of the input only affects raw text values; an input from a column value or the result of another expression would not be so affected.

NUMBER("14.2") returns  14 . Unlike the preceding example, the quoted raw text value of "14.2" does not correspond to a valid Date , DateTime , or Time value, allowing NUMBER() to work with the given text and to return the expected result.

NUMBER("Hello!") returns  0 , as the input value in no way resembles a numeric value.

NUMBER("") returns a blank Number value.

Syntax

NUMBER( value )

  • value  - Any value.

See also

DATE()

DATETIME()

DECIMAL()

TEXT()

TIME()

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu
11168355942639959927
true
Search Help Center
true
true
true
false
false
false
false
Create a Mobile Website
View Site in Mobile | Classic
Share by: