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

# Timestamp Functions

## `current_timestamp`

*Supported Signatures*

```sql theme={null}
function current_timestamp() returns timestamp
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#current_timestamp)

## `format_timestamp`

*Supported Signatures*

```sql theme={null}
function format_timestamp $1(string, $1) returns string
	where $1 in (timestamp, date)
function format_timestamp(string, timestamp, time_zone string) returns string
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#format_timestamp)

## `parse_timestamp`

*Supported Signatures*

```sql theme={null}
function parse_timestamp(string, string) returns timestamp
function parse_timestamp(string, string, time_zone string) returns timestamp
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#parse_timestamp)

## `timestamp`

*Supported Signatures*

```sql theme={null}
function timestamp(string) returns timestamp
function timestamp(string, time_zone string) returns timestamp
function timestamp(date) returns timestamp
function timestamp(date, time_zone string) returns timestamp
function timestamp(datetime) returns timestamp
function timestamp(datetime, time_zone string) returns timestamp
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#timestamp)

## `timestamp_add`

*Supported Signatures*

```sql theme={null}
function timestamp_add $1($1, interval) returns $1
	where $1 in (timestamp, date)
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#timestamp_add)

## `timestamp_diff`

*Supported Signatures*

```sql theme={null}
function timestamp_diff $1($1, $1, date_part string) returns bigint
	where date_part in (microsecond, millisecond, second, minute, hour, day, week, month, quarter, year)
	where $1 in (timestamp, date)
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#timestamp_diff)

## `timestamp_micros`

*Supported Signatures*

```sql theme={null}
function timestamp_micros(int64) returns timestamp
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#timestamp_micros)

## `timestamp_millis`

*Supported Signatures*

```sql theme={null}
function timestamp_millis(int64) returns timestamp
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#timestamp_millis)

## `timestamp_seconds`

*Supported Signatures*

```sql theme={null}
function timestamp_seconds(int64) returns timestamp
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#timestamp_seconds)

## `timestamp_sub`

*Supported Signatures*

```sql theme={null}
function timestamp_sub $1($1, interval) returns $1
	where $1 in (timestamp, date)
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#timestamp_sub)

## `timestamp_trunc`

*Supported Signatures*

```sql theme={null}
function timestamp_trunc $1($1, date_time_part string) returns $1
	where date_time_part in (microsecond, millisecond, second, minute, hour, day, week, week(monday), week(tuesday), week(wednesday), week(thursday), week(friday), week(saturday), week(sunday), isoweek, month, quarter, year, isoyear)
	where $1 in (timestamp, date)
function timestamp_trunc(timestamp, date_time_part string, time_zone string) returns timestamp
	where date_time_part in (microsecond, millisecond, second, minute, hour, day, week, week(monday), week(tuesday), week(wednesday), week(thursday), week(friday), week(saturday), week(sunday), isoweek, month, quarter, year, isoyear)
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#timestamp_trunc)

## `unix_micros`

*Supported Signatures*

```sql theme={null}
function unix_micros(timestamp) returns int64
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#unix_micros)

## `unix_millis`

*Supported Signatures*

```sql theme={null}
function unix_millis(timestamp) returns int64
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#unix_millis)

## `unix_seconds`

*Supported Signatures*

```sql theme={null}
function unix_seconds(timestamp) returns int64
```

[🔗 Official Documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#unix_seconds)
