---
title: "gsql_year_epoch()"
component: "gsql-ref"
version: "4.3"
module: "ddl-and-loading"
html_url: "/gsql-ref/4.3/ddl-and-loading/functions/token/gsql_year_epoch"
canonical_url: "https://www.tigergraph.com/docs/gsql-ref/4.3/ddl-and-loading/functions/token/gsql_year_epoch"
markdown_url: "https://www.tigergraph.com/docs/gsql-ref/4.3/ddl-and-loading/functions/token/gsql_year_epoch.md"
---

[View as HTML](https://www.tigergraph.com/docs/gsql-ref/4.3/ddl-and-loading/functions/token/gsql_year_epoch)

# gsql_year_epoch()

Returns 4-digit year from a Unix [epoch time](https://en.wikipedia.org/wiki/Unix%5Ftime) value.

## Syntax

`gsql_year_epoch(epoch)`

## Parameters

epoch

Required. A Unix epoch time value.

## Return type

`INT`

## Example

gsql_year_epoch(1657327158) -> 2022
