Literals

A literal is a piece of information that you manipulate or use in a formula.

Literals are of these types:

  • Numeric

  • Text

  • Date

  • Array

Numeric Literals

Follow these rules when entering numeric literals:

  • Don't use quotes to enclose the literal.

  • Don't use commas or spaces in the number.

  • Don't use exponents and floating point scientific notations.

  • You can enter numbers that have a decimal component after a decimal point.

  • To enter a negative number, precede it with a minus sign (-).

Here are a few examples of numeric literals:

  • 63

  • 3.55

  • -2.3

  • -.033

  • -.2

  • 10000

Text Literals

When you enter text literals, enclose them in single quotes. Text literals can contain spaces. To enter a single quote character in a text constant, enter two single quotes (for example, 'P O'Donnell'). Note that this isn't the same as the double quotes ('').

Here are a few examples of text literals:

  • 'J. Smith'

  • '1234'

  • 'Manager'

  • '12 Union Road'

  • 'The Bonus this year is 23%'

Date Literals

When you enter a date literal, enclose dates in single quotes and follow immediately with the word date in brackets.

Here are a few examples of date literals:

  • '2010-11-04T00:00:00.000Z' (DATE)

  • '1989-03-12 00:00:00' (DATE)

  • '12-MAR-1989' (DATE)

Array Literals

An array holds multiple values that the formula can access using the corresponding index values. You define array literals only for an empty array of each type.

Array literals are of these types:

  • Array of date values indexed by a numeric index (EMPTY_DATE_NUMBER)

  • Array of number values indexed by a numeric index (EMPTY_NUMBER_NUMBER)

  • Array of text values indexed by a numeric index (EMPTY_TEXT_NUMBER)

  • Array of date values indexed by a text index (EMPTY_DATE_TEXT)

  • Array of numeric values indexed by a text index (EMPTY_NUMBER_TEXT)

  • Array of text values indexed by a text index (EMPTY_TEXT_TEXT)