Calligra Sheets TIMEVALUE Function: Convert Time Text to a Decimal Day
Learn Calligra Sheets TIMEVALUE with source-checked text input requirements, reproducible formulas, fractional-day arithmetic and locale-aware troubleshooting.
Verification status: Consult the documentation and examples below. Native application testing has not been documented for this guide. How formula examples are checked
Quick answer
TIMEVALUE converts a time expressed as text into the fractional part of a day. For example, =TIMEVALUE("12:00:00") has an independently calculated expected value of 0.5 if the installed locale accepts the supplied text: noon is 12 of 24 hours after midnight. The function is especially useful when an import leaves times as textual labels instead of time values. It is not the same as TIME, which builds a time from three numeric components. [V1, V2]
Evidence scope: KDE’s handbook, function XML and pinned Calligra 26.08.2 code were inspected October 12, 2026; KDE released 26.08.2 on October 8. The pinned source commit is 72123cc643f6625351139e7df294544255a1056f. Every numerical result in this guide is an independent calculation or a documentation example, not a measurement from a Calligra workbook. Native Calligra execution, screenshots and locale-parse tests were not performed. [V1, V3]
Exact syntax, required input and output type
=TIMEVALUE(time)
The official Calligra handbook and datetime.xml specify one time argument of type Text and a floating-point result. Supply a text literal, such as "10:05:02", or reference a cell/formula that evaluates to text representing a time. The documentation does not identify an optional argument or default. In pinned datetime.cpp, the function registration does not set an explicit setParamCount, so the detailed missing/extra-argument enforcement depends on the underlying registration defaults; no undocumented zero-argument invocation should be claimed valid. The callback directly uses args[0], confirms it is a string, converts it using the locale-aware asTime(), then returns its asFloat() result. If the input is not a string or conversion reports an error, the callback returns Value::errorVALUE(). The precise UI rendering of this error was not natively observed. [V2, V3, V4]
Important source-level distinction: =TIMEVALUE(TIME(9;30;0)) is not a safe substitute for passing text. The pinned TIME callback returns a typed Time value, while the TIMEVALUE callback requires args[0].isString(). A typed time passed directly is therefore a source-inferred error case, subject to native validation and any evaluation-layer transformations. To get a numeric serial for a time that is already typed, use the product’s appropriate number format or separate confirmed conversion logic rather than wrapping everything in TIMEVALUE. [V4, V5]
Locale: The KDE handbook uses semicolon formula separators in its examples; Calligra’s installed separator and accepted text-times can differ by regional settings. Explicit 24-hour strings make examples reproducible in many locales, but no proof has been obtained for every locale or native build. Even the punctuation in "10:05:02" is subject to parsing configuration. Confirm the representation accepted by the target installation. [V1, V4]
A six-row reproducible conversion worksheet
Open a new worksheet. In A1, enter Time text; in B1, enter TIMEVALUE result; in C1, enter Manual fractions / reasoning. In A2 enter the formula ="00:00:00" (rather than typing a time-looking literal that the app may auto-convert into a time). Enter the other five clock strings below as comparable text-producing formulas in column A. In B2 enter =TIMEVALUE(A2) and fill B2 down through B7. Set column B to a decimal number format with at least six decimal places before comparing. The table assumes these strings are recognized by the installed locale. [V1, V4, V6]
| Row | Formula entered in A | Formula entered in B | Independently calculated expected B (if text parses) | Manual derivation |
|---|---|---|---|---|
| 2 | ="00:00:00" |
=TIMEVALUE(A2) |
0 | 0 seconds / 86400 |
| 3 | ="06:00:00" |
=TIMEVALUE(A3) |
0.25 | 21600 / 86400 |
| 4 | ="09:30:00" |
=TIMEVALUE(A4) |
0.3958333333… | 34200 / 86400 |
| 5 | ="12:00:00" |
=TIMEVALUE(A5) |
0.5 | 43200 / 86400 |
| 6 | ="18:45:30" |
=TIMEVALUE(A6) |
0.7815972222… | 67530 / 86400 |
| 7 | ="23:59:59" |
=TIMEVALUE(A7) |
0.9999884259… | 86399 / 86400 |
How results were checked: divide the number of elapsed whole seconds after midnight by 86,400 seconds per day; these ratios were independently calculated. In particular, 09:30 gives 9×3600 + 30×60 = 34,200 seconds and 34,200/86,400 = 19/48. This is arithmetic verification of expected results, not Calligra-native parsing validation. If the installed application rejects a string, record the locale and observed error rather than claiming the expected number is guaranteed. [V1, V6]
Official example: why 0.42 is rounded
KDE’s handbook explicitly shows TIMEVALUE("10:05:02") returning 0.42. A detailed independent calculation gives (10×3600 + 5×60 + 2) / 86400 = 36,302 / 86,400 ≈ 0.4201620370. At two decimal places this is 0.42. Therefore, the displayed two-decimal handbook example does not prove that the stored value is exactly 0.42; treating it as a truncated/exact scalar would lose precision. To inspect a value yourself, use a number format with 8–10 decimal places in the installed sheet. The handbook’s display is documentation-supported; the longer number is arithmetically expected but not observed natively. [V1, V6]
Advanced practical applications
Imported appointment start times: Suppose A2:A7 comes from a CSV import as text. B2’s conversion produces a fractional day (if valid), which can support numeric sorting and time differences. When you need minutes since midnight, enter =B4*1440 in D4. For row 4 (09:30), the expected result is 570 minutes; 0.3958333333… × 1440 = 570. Do not round B first to two decimal places or you can lose minutes. [V6, V7]
Text-to-time diagnostic: In a separate C2, use =TIMEVALUE("12:00:00"). If this direct literal succeeds but =TIMEVALUE(A2) does not, inspect A2’s underlying value/type: it may have been auto-interpreted as a time instead of text, or its text may contain spaces or an unexpected AM/PM format. A3 created by ="06:00:00" is intended to remain text; verify its actual input type in your installation. [V4]
Advanced calculation with seconds: For ="18:45:30", =TIMEVALUE(A6)*86400 has the expected arithmetic outcome 67,530 seconds, assuming text parsing succeeds and floating-point rounding does not change the displayed final integer. In a live workbook, display with enough precision or round only at the final step. [V6, V7]
Clock time versus elapsed duration: a time fraction by itself does not contain a date. An overnight interval from 23:30 to 01:15 has to be handled with actual date+time values or an explicit overnight rule. Subtracting fractions naïvely gives a negative number; that is not proof that the conversion was wrong. [V7]
Errors, defaults, regional settings and limits
- Non-text argument: Pinned 26.08.2 source contains an explicit
args[0].isString()condition. A typed numeric argument or a typedTimevalue is a source-inferredValue::errorVALUE()case rather than an unconditional supported input. Native evaluation and visible error text must still be checked. [V4] - Malformed text:
"25:99:99","six o'clock"and ambiguous regional timestamp strings have no guaranteed outcome here. The callback callsasTime()and returns a conversion error when that conversion fails; the precise acceptance rules come from the locale/conversion layer, not the handbook heading. Do not invent a value or error text for them. [V4] - Missing time: The function documentation defines one text input and no default. An empty call is not a documented alternative to CURRENTTIME; the callback assumes argument zero. [V2, V4]
- Spaces and CSV imports: Leading/trailing spaces, nonbreaking spaces and locale-specific separators can prevent recognition. Confirm and clean the input string rather than assuming that
TIMEVALUEautomatically removes arbitrary whitespace. [V4] - Date/time with text date prefix: Excel and LibreOffice explicitly document ignoring the date portion of some text values. The examined Calligra callback only delegates to
asTime()and its official example is a time-only string. Without a Calligra-native test, do not claim it accepts all mixed date/time strings or follows Excel’s parsing rules. [V4, V8, V9] - Display versus storage: A cell formatted as time may display
12:00:00while its numeric fraction is0.5. The handbook labels TIMEVALUE’s result a float; to see that float in the output cell, use a number format rather than a clock format. [V1, V2]
Compatibility with Excel and LibreOffice (product-specific evidence)
Microsoft Excel documents TIMEVALUE(time_text) with a required text argument and fractional-day output. LibreOffice Calc documents the same broad conversion purpose and permits time text in its own accepted formats. This supports a general conceptual similarity but not identical accepted text spellings, locale handling, error messages or treatment of mixed date/time strings in Calligra. Each application’s parsing must be checked independently. [V8, V9]
Calligra-specific evidence from datetime.cpp is stronger for one narrow claim: a string type check is present in Calligra’s callback. That is why this guide explicitly warns against calling TIMEVALUE on a typed numeric/time result. In contrast, if three numeric hour/minute/second values are available, use TIME(hours;minutes;seconds) and avoid parsing text entirely. [V4, V5]
Troubleshooting: a reproducible diagnostic sequence
- Start with the official literal
=TIMEVALUE("10:05:02")and a numeric cell format. Its handbook display example is 0.42; the independent fraction is ~0.4201620370. - Compare with a simpler value
=TIMEVALUE("12:00:00"), expected 0.5. If rejected, confirm locale-specific time format and formula syntax. - Check the input’s type:
=TIMEVALUE(TIME(12;0;0))is source-inferred as unsafe because TIME produces a typed Time and TIMEVALUE expects a string. - Ensure a text input really is text: use
="12:00:00"as a controlled source rather than relying on automatic cell entry. Verify the type in the formula bar. - Inspect error behavior: write down the installed Calligra version, platform, regional settings, exact formula and observed output; do not treat expected results as executed tests.
- If 0.42 seems inaccurate: do not infer truncation. Format to 8–10 digits and independently compare 36302/86400.
- Avoid trusting copied Excel behavior: Excel’s and LibreOffice’s accepted date+time strings do not establish Calligra’s acceptance for the same strings.
Verified official and compatibility references
- KDE handbook: TIMEVALUE — text input, fractional-day purpose and 0.42 handbook display example. Checked 2026-10-12. [V1]
- KDE
datetime.xmllines 52–65, pinned — source-authored argument type, return type and examples. Checked 2026-10-12. [V2] - KDE TIMEVALUE registration, pinned lines 165–166 — name registration without explicit per-function arity override. [V3]
- KDE TIMEVALUE callback, pinned lines 407–416 — source-level string guard, locale conversion, float return and VALUE error. [V4]
- KDE TIME callback, pinned lines 564–573 — typed Time result, used only for the contrast. [V5]
- KDE Gear 26.08.2 release notice — version context; checked 2026-10-12. [V3]
- Excel TIMEVALUE function, Microsoft — independently documented Excel behavior, not a claim about Calligra. Checked 2026-10-12. [V8]
- LibreOffice TIMEVALUE reference — independently documented LibreOffice behavior, not a Calligra test. Checked 2026-10-12. [V9]
Testing limitation: Native Calligra parsing, error presentation and workbook interchange remain untested.