{
  "category": "Date and time functions",
  "display_name": "TIME",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.TIME",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1296,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1296,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,296 in the answer bank and 8 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,304 recorded answers",
    "workbook_corpus": {
      "cells": 8,
      "matched": 8
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/dates.rs#L232-L235",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/date_kernels.rs#L145-L158"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/dates.rs#L232-L235",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,304 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.TIME.json",
  "name": "TIME",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- **[DATE](FUNC.DATE.md)** — the integer-part constructor. `DATE(...) + TIME(...)` is the\n  idiomatic way to build a full timestamp.\n- **[HOUR](FUNC.HOUR.md), [MINUTE](FUNC.MINUTE.md), [SECOND](FUNC.SECOND.md)** — the\n  decomposition. They are the left inverses of `TIME` on the in-range domain, modulo the\n  representability caveat above.\n- **[TIMEVALUE](FUNC.TIMEVALUE.md)** — reaches the same fractions from text, and is\n  locale-dependent where `TIME` is not.\n- **[NOW](FUNC.NOW.md)** — supplies a live timestamp whose fractional part is what `TIME` would\n  construct.\n- **Confusable.** `TIME` and the `TEXT` function with a time format code are routinely\n  interchanged in advice; `TEXT` produces text, `TIME` produces a number.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n\n1. **Sum first, wrap once.** Computing `h mod 24` before adding minutes and seconds gives the\n   right answer for the documented examples but is fragile; summing to total seconds and taking\n   one modulus is both simpler and closer to what the documentation describes.\n2. **Decide the negative policy explicitly.** Whichever behaviour Excel turns out to have, an\n   implementation that falls into it accidentally through language-defined `%` semantics is a\n   latent divergence. Rust and C `%` truncate toward zero; Python's `%` floors. They disagree\n   exactly on the undocumented case.\n3. **Do not round the result.** The publication profile for this function is the plain IEEE-754\n   double (see [the call pipeline](../model/03-call-pipeline.md)); the visible \"0.99988426\" in the\n   documentation is a display of the maximum, not a rounding rule.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns a `Number` in [0, 1). Excel will normally show it in a time format; that formatting is\nhost-side adaptation and not part of the value (see\n[the call pipeline](../model/03-call-pipeline.md), stage 4).\n\nBecause the result is a binary double and the natural denominator is 86400 — which is not a power\nof two — almost every time value is inexact. `TIME(0,0,1)` is not exactly 1/86400. This is not a\ndefect of `TIME`; it is the same representability fact that makes `=A1-B1` on two timestamps\nproduce values like 0.20833333333333337. It becomes visible when a time is compared for equality,\nor fed back through `HOUR`/`MINUTE`/`SECOND`.\n\nArgument coercion is the ordinary scalar behaviour of\n[coercion and lifting](../model/02-coercion-and-lifting.md): numeric text converts, logicals\nbecome 1 and 0, an error argument propagates.\n\n\n\n### Errors\n\n\nMicrosoft's TIME page documents overflow handling but does not enumerate error conditions. What\ncan be said honestly:\n\n- `#VALUE!` from an argument that will not convert to a number is the ordinary coercion outcome,\n  not a `TIME`-specific rule.\n- An error value passed as any argument propagates.\n- Whether arguments above the documented 32767 ceiling, or negative arguments, produce `#NUM!` is\n  **not documented on that page and not verified here**.\n\n\n",
    "sources": "\n- Microsoft 365 support, **TIME function** —\n  <https://support.microsoft.com/en-us/office/time-function-9a5aff99-8f7d-4611-845e-747d0b8d5457>.\n  Source of the argument ranges, the three overflow rules, and the 0–0.99988426 result range.\n- [FUNC.DATE](FUNC.DATE.md) — this Handbook's account of the serial-number model, which this page\n  assumes rather than repeats.\n- Handbook call-model chapters\n  [02 coercion and lifting](../model/02-coercion-and-lifting.md) and\n  [03 call pipeline](../model/03-call-pipeline.md).\n- `data/functions/FUNC.TIME.json`, `data/presence/FUNC.TIME.json`, `data/battery/FUNC.TIME.json`.\n\n",
    "version-differences": "The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 20430 | Windows, 64-bit, CPU not recorded | 1,296 |\n\nThe record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.TIME.json).",
    "what-it-does": "\n`TIME` is the constructor for the *fractional* half of a date serial, as\n[DATE](FUNC.DATE.md) is the constructor for the integer half. It takes three numbers and returns\nthe fraction of a day that they name:\n\n> `TIME(h, m, s)` = frac( (3600·h + 60·m + s) / 86400 )\n\nThat is the whole definition, and reading it as one expression rather than three separate rules\nexplains everything Microsoft's page documents piecewise. The page says an hour above 23 \"will be\ndivided by 24 and the remainder will be treated as the hour value\", that a minute above 59 \"will\nbe converted to hours and minutes\", and that a second above 59 \"will be converted to hours,\nminutes, and seconds\". All three are the same statement: the three components are summed into\nseconds, and only the position within the day survives.\n\nTwo properties follow immediately, and both matter:\n\n1. **The result is always in [0, 1).** Microsoft documents the range as 0 to 0.99988426, which is\n   86399/86400 — one second short of a full day. `TIME` cannot return 1, and therefore cannot\n   express \"24:00\" or any duration longer than a day.\n2. **`TIME` is a clock, not a stopwatch.** `TIME(25,0,0)` is 01:00, not \"25 hours\". To express a\n   duration you do the division yourself: `25/24`. This is the single most common misuse of the\n   function.\n\nLike `DATE`, `TIME` is a normalizing constructor rather than a validator: it does not reject 90\nminutes, it carries them.\n\n\n\n### Arguments\n\n\n`TIME(hour, minute, second)` — all three required.\n\n| Argument | Documented admissible range | What out-of-range does |\n|---|---|---|\n| `hour` | 0 … 32767 | values above 23 wrap modulo 24 |\n| `minute` | 0 … 32767 | values above 59 carry into hours |\n| `second` | 0 … 32767 | values above 59 carry into minutes and hours |\n\nThe 32767 ceiling is the documented upper bound on each argument. Microsoft's page does not state\nwhat happens above it; this Handbook has not checked, and `#NUM!` is a guess, not a finding.\n\nNegative components are the genuinely under-documented case. The page gives ranges starting at 0\nand says nothing about negatives, yet `TIME(1,-30,0)` is a perfectly well-formed call. Whether it\nyields 00:30, an error, or a wrapped value is unknown here — see below.\n\n\n"
  },
  "signature": {
    "display": "TIME(hour, minute, second)",
    "parameters": [
      {
        "description": null,
        "name": "hour",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "minute",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "second",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 3
      },
      "category": "Date and time functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Time serial (fraction of a day) for an hour, minute and second",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the serial number of a particular time",
        "microsoft_url": "https://support.microsoft.com/en-us/office/time-function-9a5aff99-8f7d-4611-845e-747d0b8d5457"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "TIME"
        },
        {
          "locale": "bg-BG",
          "name": "TIME"
        },
        {
          "locale": "cs-CZ",
          "name": "TIME"
        },
        {
          "locale": "da-DK",
          "name": "TID"
        },
        {
          "locale": "de-DE",
          "name": "TIME"
        },
        {
          "locale": "el-GR",
          "name": "TIME"
        },
        {
          "locale": "en-AU",
          "name": "TIME"
        },
        {
          "locale": "en-GB",
          "name": "TIME"
        },
        {
          "locale": "en-US",
          "name": "TIME"
        },
        {
          "locale": "es-ES",
          "name": "HORA"
        },
        {
          "locale": "et-EE",
          "name": "TIME"
        },
        {
          "locale": "fi-FI",
          "name": "AIKA"
        },
        {
          "locale": "fr-FR",
          "name": "TIME"
        },
        {
          "locale": "he-IL",
          "name": "TIME"
        },
        {
          "locale": "hr-HR",
          "name": "TIME"
        },
        {
          "locale": "hu-HU",
          "name": "TIME"
        },
        {
          "locale": "id-ID",
          "name": "TIME"
        },
        {
          "locale": "it-IT",
          "name": "ORARIO"
        },
        {
          "locale": "ja-JP",
          "name": "TIME"
        },
        {
          "locale": "ko-KR",
          "name": "TIME"
        },
        {
          "locale": "lt-LT",
          "name": "TIME"
        },
        {
          "locale": "lv-LV",
          "name": "TIME"
        },
        {
          "locale": "nb-NO",
          "name": "TIME"
        },
        {
          "locale": "nl-NL",
          "name": "TIJD"
        },
        {
          "locale": "pl-PL",
          "name": "TIME"
        },
        {
          "locale": "pt-BR",
          "name": "TIME"
        },
        {
          "locale": "pt-PT",
          "name": "TIME"
        },
        {
          "locale": "ro-RO",
          "name": "TIME"
        },
        {
          "locale": "ru-RU",
          "name": "TIME"
        },
        {
          "locale": "sk-SK",
          "name": "TIME"
        },
        {
          "locale": "sl-SI",
          "name": "TIME"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "TIME"
        },
        {
          "locale": "sv-SE",
          "name": "TIME"
        },
        {
          "locale": "th-TH",
          "name": "TIME"
        },
        {
          "locale": "tr-TR",
          "name": "ZAMAN"
        },
        {
          "locale": "uk-UA",
          "name": "TIME"
        },
        {
          "locale": "vi-VN",
          "name": "TIME"
        },
        {
          "locale": "zh-CN",
          "name": "TIME"
        },
        {
          "locale": "zh-HK",
          "name": "TIME"
        },
        {
          "locale": "zh-TW",
          "name": "TIME"
        }
      ],
      "signature": {
        "display": "TIME(hour, minute, second)",
        "parameters": [
          {
            "description": null,
            "name": "hour",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "minute",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "second",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "TIME",
      "version_marker": null,
      "xlcall": {
        "code": "66",
        "symbol": "xlfTime"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/time-function-9a5aff99-8f7d-4611-845e-747d0b8d5457"
  },
  "try_it": {
    "formula": "=TIME(12,34,56)"
  },
  "url": "https://handbook.dnacalc.com/functions/TIME.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,296 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.TIME.json"
      ]
    }
  ]
}