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

# MAKE_TIMESTAMP

> Constructs a UTC timestamp from calendar and time components.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

Returns NULL if a supplied argument is NULL, the calendar/time fields are out of range, the timezone name is invalid, or the local time is ambiguous or nonexistent in that timezone.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
make_timestamp(year, month, day, hour, minute, second [, timezone])
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| year | TINYINT, SMALLINT or INTEGER | Yes | Calendar/time component. Converted to INTEGER. Cast a BIGINT, floating-point or decimal expression explicitly to INTEGER before calling this form. |
| month | TINYINT, SMALLINT or INTEGER | Yes | Calendar/time component. Converted to INTEGER. Cast a BIGINT, floating-point or decimal expression explicitly to INTEGER before calling this form. |
| day | TINYINT, SMALLINT or INTEGER | Yes | Calendar/time component. Converted to INTEGER. Cast a BIGINT, floating-point or decimal expression explicitly to INTEGER before calling this form. |
| hour | TINYINT, SMALLINT or INTEGER | Yes | Calendar/time component. Converted to INTEGER. Cast a BIGINT, floating-point or decimal expression explicitly to INTEGER before calling this form. |
| minute | TINYINT, SMALLINT or INTEGER | Yes | Calendar/time component. Converted to INTEGER. Cast a BIGINT, floating-point or decimal expression explicitly to INTEGER before calling this form. |
| second | TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE or DECIMAL(p, s) | Yes | Calendar/time component. Finite 0 \<= seconds \<= 60. Fractional seconds must round to fewer than 1000000 microseconds within the second. Exactly 60 advances to the next minute. Converted to DOUBLE; fractional seconds are permitted. For DECIMAL(p, s), p is precision (total digits) and s is scale (digits after the decimal point). |
| timezone | STRING | No | Interpretation timezone. Default: UTC. |

## Returns

* Type: TIMESTAMP with UTC timezone
* NULL behavior: Returns NULL if a supplied argument is NULL, the calendar/time fields are out of range, the timezone name is invalid, or the local time is ambiguous or nonexistent in that timezone.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Exact result | Yes |

## Usage notes

* Year 1..9999, month 1..12, day forming a valid date, hour 0..23, minute 0..59, second 0..60.
* Seconds may be fractional and round to microseconds. Second 60 advances one minute.
* With a named time zone, MAKE\_TIMESTAMP returns NULL for local times that occur twice or are skipped during a clock change.
* INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.

## Examples

### Basic example

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT make_timestamp(2024,2,29,10,30,45) AS result;
```

| result |
| - |
| 2024-02-29 10:30:45 UTC |

### Invalid timezone and daylight-saving gap

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT
  make_timestamp(2024, 2, 29, 10, 30, 45, 'Not/A_Zone') IS NULL AS invalid_zone,
  make_timestamp(2024, 3, 31, 2, 30, 0, 'Europe/Berlin') IS NULL AS dst_gap;
```

| invalid\_zone | dst\_gap |
| - | - |
| true | true |

## Limitations

* Use fractional seconds that round to fewer than 1000000 microseconds within the second, or use exactly 60 seconds. Values that round across that boundary are outside this form.
* For column expressions, year, month, day, hour and minute must be INTEGER (or narrower integers). Wider numeric types need an explicit CAST to INTEGER. The seconds component is converted to DOUBLE for fractional seconds.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.