> ## Documentation Index
> Fetch the complete documentation index at: https://docs.farmtrace.co.za/llms.txt
> Use this file to discover all available pages before exploring further.

# Time functions

> Create a time of day and read its hour, minute, or second.

Time values represent a clock time without a calendar date. Use [timestamp functions](/reference/timestamp) when the value must identify an exact moment.

## `Hour`

Returns the hour component of a time using the 24-hour clock.

* **Syntax:** `Hour(time)`
* **Requires:** a Time value.
* **Returns:** Numeric, from `0` through `23`.
* **Best for:** grouping appointments or checks by hour.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Hour([Inspection Time])
```

## `Minute`

Returns the minute component of a time.

* **Syntax:** `Minute(time)`
* **Requires:** a Time value.
* **Returns:** Numeric, from `0` through `59`.
* **Best for:** inspecting or validating a stored time.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Minute(Time(14, 35))
```

## `Second`

Returns the second component of a time, including any millisecond fraction.

* **Syntax:** `Second(time)`
* **Requires:** a Time value.
* **Returns:** Numeric, from `0` up to but not including `60`.
* **Best for:** integrations or precise time comparisons.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Second(Time(14, 35, 12.5))
```

## `Time`

Creates a time from seconds after midnight, or from hour, minute, and optional seconds components.

* **Syntax:** `Time(seconds)`, `Time(hour, minute)`, or `Time(hour, minute, second)`
* **Requires:** numeric components. Seconds may contain a millisecond fraction; overflow or negative values wrap within a 24-hour day.
* **Returns:** Time.
* **Best for:** fixed cut-off times and constructing a time from separate values.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Time(8, 30)
Time(16, 45, 30.5)
```

<Tip>
  Use `ToTimeOfDay` when the source is text or a timestamp rather than separate numeric components.
</Tip>
