# UNIX\_TIMESTAMP

Returns the current Unix time as an integer, or converts the given date into unixtime.

## Syntax

```
UNIX_TIMESTAMP ( dateobj )

```

## Arguments

* dateobj: a valid date, datetime, or parsable date string. Defaults to `CURRENT_TIMESTAMP`.

## Return Type

Integer

## Remarks

The `UNIX_TIMESTAMP` function supports improved segment elimination (A process where metadata stored for columnstore segments is used to determine where a segment can match a filter queried at execution time.) when used in `WHERE` clauses. See the following query example:

```sql
SELECT ... FROM table_name WHERE UNIX_TIMESTAMP(column_name) > UNIX_TIMESTAMP('2000-01-01 00:00:00');
```

## Examples

```sql
SELECT UNIX_TIMESTAMP();

```

```output

+------------------+
| UNIX_TIMESTAMP() |
+------------------+
|       1425430836 |
+------------------+

```

```sql
SELECT UNIX_TIMESTAMP('2009-02-13 23:31:30') AS funday;

```

```output

+------------+
| funday     |
+------------+
| 1234567890 |
+------------+
```

## Related Topics

* [FROM\_UNIXTIME](https://docs.singlestore.com/cloud/reference/sql-reference/date-and-time-functions/from-unixtime.md)

***

Modified at: May 31, 2023

Source: [/cloud/reference/sql-reference/date-and-time-functions/unix-timestamp/](https://docs.singlestore.com/cloud/reference/sql-reference/date-and-time-functions/unix-timestamp/)

(An index of the documentation is available at /llms.txt)
