Skip to content

n

Convert a value to a number; non-numeric becomes 0.

v = n(value)

Returns the numeric form of value. Numbers pass through; logical TRUE becomes 1, FALSE 0; dates become serial numbers; text and errors become 0. Counterpart of t.

n(7) % 7
n(true) % 1
n('text') % 0
  • t — Return text values unchanged; non-text values become empty.
  • value — Convert a text string to a number.