Contact

TIMEVALUE in ONLYOFFICE Spreadsheet Editor

Date and Time Intermediate ONLYOFFICE Spreadsheet Editor

Convert time text to a fraction of a day in ONLYOFFICE with clock-format examples, elapsed-time cautions and locale-aware parsing limits.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =TIMEVALUE("16:30") is independently expected to return 0.6875 under the inspected colon-time parser path. Format that number as a time to display 16:30.

Availability and evidence scope

  • Introduced: Original introduction release is not established by the sources checked.
  • Available: Documented in current unversioned ONLYOFFICE function help, checked October 18, 2026.
  • Implementation inspected: Official SDKJS v10.0.0.169, commit 3679e0375a758d7dc59d31337a45461be3525ed8. This establishes a source snapshot, not identical behavior in every installed editor.
  • Retired or deprecated: Retirement or formal deprecation is not established by these sources. A legacy spelling is not automatically a removed function.
  • Testing: Examples are independently calculated or labeled source predictions. No ONLYOFFICE application or calculation-engine execution was performed. No native screenshot or general import/export guarantee is claimed.

Use English names and comma separators as shown; adapt separators outside quoted text if your locale requires semicolons. Keep full precision in calculations and round only the displayed summary.

Syntax and numeric meaning

=TIMEVALUE(time_text)

Exactly one argument is required. The function converts its argument to text and asks the format parser to recognize a date/time value. It returns the fractional part of the parsed serial by subtracting its integer part.

One whole day is 1. Noon is 12/24=0.5, 06:00 is 0.25 and 18:00 is 0.75. A time format changes how this fraction is displayed; it does not change the numeric unit into hours. To obtain decimal hours from an ordinary time-of-day fraction, multiply by 24.

The official help gives 24-hour and AM/PM text examples. The inspected parser uses culture-specific separators and names, with a colon-time path. The examples here use ASCII clock strings; they are source-derived expectations, not proof of every locale or imported timestamp format.

Step-by-step: convert a clock string

  1. On a fresh worksheet put the literal text 16:30 in A2. Keep it as text if the editor would otherwise convert it on entry.
  2. Enter =TIMEVALUE(A2) in B2.
  3. Format B2 as a number: expected value 0.6875.
  4. Format another reference to B2 as a time: its intended clock display is 16:30, subject to your chosen display pattern.
  5. Enter =B2*24 to obtain decimal hours 16.5.

The independent arithmetic is (16*60+30)/(24*60)=990/1440=0.6875. This calculation establishes the unit conversion without running ONLYOFFICE. In a 12-hour display, the same value may appear as 4:30 PM; those are different presentations of the same day fraction.

Advanced case: a time component within date-time text

For text 2025-01-01 18:00, the inspected parser can produce a combined date serial and fraction. TIMEVALUE removes the integer date part, leaving 0.75. It does not return the date, an absolute timestamp or a timezone-adjusted instant.

This is useful for grouping recognized records by local clock time, but it loses which day the event occurred. Keep the date and original timestamp when analyzing intervals across multiple days. Two events at 18:00 on different days have the same time fraction even though their timestamps differ.

The source accepts the general date/time parser flag rather than requiring a time-specific flag. Do not treat success as proof that the input explicitly contained a clock component. A recognized date-only input can have a zero fractional part, which is numerically indistinguishable from midnight after the date has been discarded.

Duration versus clock time

A time of day is not the same as an elapsed duration. The inspected parser can normalize an hour count above 23 into a value containing whole days. For "25:00", the source path yields a parsed value of 1+1/24, after which TIMEVALUE retains only 1/24 = 0.0416666666667. This is a source prediction, not a native display claim, and it means the function does not preserve a 25-hour duration.

If your source field means an elapsed duration, retain total hours or seconds as a numeric quantity rather than silently passing it through TIMEVALUE. An elapsed-time display pattern cannot restore a whole day that the function has already discarded.

For a simple same-day interval, parsed 16:30 minus parsed 09:00 gives 7.5/24=0.3125 days, or 7.5 hours after multiplying by 24. For an overnight interval, include actual dates or an explicitly justified rollover rule; blindly taking the difference of clock fractions can be negative even when time advanced.

Locale, input checks and errors

The parser consults culture information for date/time separators and AM/PM handling. Do not assume that an English month name or AM/PM marker works identically in every deployment. Full four-digit dates and unambiguous 24-hour clock strings reduce ambiguity but do not replace a local parser check.

Unrecognized text leads to the value-type error category, conventionally #VALUE!. The parser also checks minute and second fields for their normal ranges in the inspected path. Other normalization behavior exists, so a general assertion that every nonstandard hour string must error would be incorrect.

Avoid numeric inputs when you mean text parsing: the wrapper first converts them to strings, and the ordinary number parser may not mark the result as date/time. For an already valid fractional-day number, keep the value and change its format rather than reparsing it through text.

The official format-parser source was inspected for these paths. No timezone, daylight-saving, locale-wide or arbitrary file-import behavior is established by this guide. Ordinary spreadsheet time fractions do not carry a timezone identifier.

Reproducible checks

These are independent mathematical expectations or identified source-error predictions, not native application results. Preserve full input precision when reproducing them.

Formula Expected result
=TIMEVALUE("16:30") 0.6875
=TIMEVALUE("12:00") 0.5
=TIMEVALUE("00:00") 0
=TIMEVALUE("2025-01-01 18:00") 0.75
=TIMEVALUE("25:00") 0.041666666666666664
=TIMEVALUE("not-a-time") #VALUE!

Use the exact input representation, date system and day-count convention above when moving a workbook between products. Similar names are not a general cross-version or file-format compatibility guarantee.

TIME constructs a time from numeric hour/minute/second values. HOUR, MINUTE and SECOND inspect its components.

First-party references