Documentation/Calc Functions/TIMEVALUE

Function name:
TIMEVALUE

Category:
Date and Time

Summary:
Takes a valid date expression passed as a string and converts its time component into a date-time serial number.

Syntax:
TIMEVALUE(DateTime)

Returns:
Returns a real number (0 ≤ x < 1) which is the fractional part of the date-time serial number calculated using the given argument. The returned value is formatted as a number by default, but you can apply other formats as needed.

Arguments:
DateTime is the string (in quotation marks) or a reference to a cell containing that string, which is the date expression to be used. If you intend to put the string in a cell, then make sure that the cell is formatted as text.


 * If DateTime does not contain a valid date expression, then TIMEVALUE reports an invalid argument error (Err:502).
 * If DateTime does not have a time component, then TIMEVALUE reports an invalid argument error (Err:502).
 * TIMEVALUE ignores any date components of DateTime.
 * If DateTime references a cell which contains a valid date expression formatted as a date, then TIMEVALUE will return an invalid argument error (Err:502). This is because Calc handles the value in that cell as a number rather than a text string.

Related LibreOffice functions:
DATE

DATEVALUE

TIME

VALUE

ODF standard:
Section 6.10.18, part 2

Equivalent Excel functions:
TIMEVALUE