你要瀏覽的網頁目前並未提供你慣用的語言版本。你可以在頁面底部選取其他語言版本,或使用 Google Chrome 內建的翻譯功能,將網頁內容即時翻譯成所選的語言。

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
Main menu
17621916870171912475
true
Search Help Center
true
true
true
false
false