Documentation/Calc Functions/VALUE

Function name:
VALUE

Category:
Text

Summary:
Converts the string representation of a number to numeric form. If the supplied string is a valid date, time, or date-time, the corresponding date-time serial number is returned.

Syntax:
VALUE(Text)

Returns:
Returns a number that corresponds to the supplied string.

Arguments:
Text is a text string (in quotation marks), a number, or a reference to a cell containing one of those types, that contains the value to be converted.


 * If Text is the empty string, then VALUE reports an invalid argument error (Err:502).
 * If Text does not contain a number, date, time, or date-time in a recognized format (which may depend on locale), then VALUE reports an invalid argument error (Err:502).

Additional details:
The detailed behavior of the VALUE function depends on your selected locale and the following guidelines provide more information.

Locale-independent behaviors
The following guidelines apply for any locale:


 * VALUE accepts a range of number formats that do not include decimal separators or digit group separators. Examples include: "+1234" (the "+" character may be omitted), "-345", "2e+3" (the "+" character may be omitted), "-2E-1", "50%" (values that end in the "%" character are divided by 100).
 * VALUE accepts fractional values, specified as an integer followed by a space and then the fraction. Examples include "-1 2/5", "+7 15/16" (the "+" character may be omitted), "0 1/2" (values between 0 and 1 are specified in this format by including a 0 integer part).
 * VALUE accepts times in "hh:mm:ss" or "hh:mm" format.
 * VALUE accepts dates in the ISO 8601 "YYYY-MM-DD" format.
 * VALUE accepts date-times in the ISO 8601 "YYYY-MM-DDThh:mm:ss" format and the related "YYYY-MM-DD hh:mm:ss" format.

Locale-dependent behaviors
On a page like this, it is impractical to capture every possibility that arises for every potential locale. Therefore, the following additional guidelines refer to the behavior of the VALUE function with the English(USA) locale selected. These should allow you to experiment to establish additional behaviors for your locale.


 * VALUE accepts a range of number formats that include decimal separators (full stop, Unicode U+002E) or digit group separators (comma, Unicode U+002C). Examples include: "+1,234.567" (the "+" character may be omitted), "-12,345.678", "+2.345e+3" (both "+" characters may be omitted), "-2.345E-1", "50.55%" (values that end in the "%" character are divided by 100), "$45.67" (the "$" character, representing the US currency unit, is ignored).
 * VALUE accepts dates that include month names. Examples include "Jul 30, 2021" (using 3-character abbreviated month names) and "July 30, 2021" (using full month names).
 * VALUE accepts dates in the "MM/DD/YYYY" and "MM/DD/YY" formats.
 * VALUE accepts times that include fractional seconds in "hh:mm:ss.ss" format.

Examples:
The following examples all refer to the English(USA) locale.

Related LibreOffice functions:
DATEVALUE

NUMBERVALUE

TIMEVALUE

ODF standard:
Section 6.13.34, part 2

Equivalent Excel functions:
VALUE