---
title: make_time function
description: Learn the syntax of the make\_time function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/make_time
---

# `make_time` function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime 18 LTS and above

> [!NOTE]
>
> Databricks Runtime 18 is newer than Databricks Runtime 18.0, 18.1, and 18.2. Features that would previously have shipped as a later numbered version now ship as dated updates to Databricks Runtime 18 instead. For details, see [About unified release notes](https://docs.databricks.com/aws/en/release-notes/runtime/18.md#unified-format).

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

Creates a time from `hour`, `minute`, and `second` fields.

## Syntax

```
make_time(hour, minute, second)
```

## Arguments

* `hour`: An INTEGER expression evaluating to a value between 0 and 23.
* `minute`: An INTEGER expression evaluating to a value between 0 and 59.
* `second`: A numeric expression evaluating to a value between 0 and 59.999999.

## Returns

A [TIME](https://docs.databricks.com/aws/en/sql/language-manual/data-types/time-type.md).

If any of the arguments is `NULL`, the result is `NULL`. If any of the arguments is out of bounds, Databricks raises [DATETIME\_FIELD\_OUT\_OF\_BOUNDS](https://docs.databricks.com/aws/en/error-messages/datetime-field-out-of-bounds-error-class.md).

## Common error conditions

* [DATETIME\_FIELD\_OUT\_OF\_BOUNDS](https://docs.databricks.com/aws/en/error-messages/datetime-field-out-of-bounds-error-class.md)

## Examples

```sql
> SELECT make_time(6, 30, 45.887);
  06:30:45.887000

> SELECT make_time(23, 59, 59);
  23:59:59

> SELECT make_time(NULL, 30, 0);
  NULL

> SELECT make_time(25, 0, 0);
  Error: DATETIME_FIELD_OUT_OF_BOUNDS
```

## Related functions

* [`time` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/time.md)
* [`make_date` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/make_date.md)
* [`make_timestamp` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/make_timestamp.md)
* [`TIME` type](https://docs.databricks.com/aws/en/sql/language-manual/data-types/time-type.md)
