# TIMESTAMP_TRUNC() Function

### Description

Truncates a timestamp to the specified precision.

### Syntax

```sql
TIMESTAMP_TRUNC(unit, timestamp)
```

### Parameters

| Parameter | Description | Data Type | Required |
| --- | --- | --- | --- |
| _unit_ | Date or time part (for example day, month, year) | String | Yes |
| _timestamp_ | Timestamp value | Timestamp | Yes |

### Example

```sql
SELECT
    TIMESTAMP_TRUNC('hour', created_at)
FROM
    rippling.employee.Employee
LIMIT
    5;
```

Source: https://developer.rippling.com/documentation/rippling-platform/transformations/sql-reference/timestamp_trunc

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
