> This page location: Date Functions > CURRENT_TIMESTAMP
> Full Neon documentation index: https://neon.com/docs/llms.txt

# PostgreSQL CURRENT_TIMESTAMP Function

**Summary**: in this tutorial, you will learn how to use the PostgreSQL `CURRENT_TIMESTAMP()` function to get the current date and time with the timezone.

## Introduction to PostgreSQL CURRENT_TIMESTAMP() function

The `CURRENT_TIMESTAMP` function returns the current date and time with the timezone.

Here's the basic syntax of the PostgreSQL `CURRENT_TIMESTAMP()` function:

```sql
CURRENT_TIMESTAMP(precision)
```

The PostgreSQL `CURRENT_TIMESTAMP()` function accepts one optional argument:

- `precision`: specifies the number of digits in the fractional seconds precision in the second field of the result.

If you omit the `precision` argument, the `CURRENT_TIMESTAMP()` function will return a `TIMESTAMP` with a timezone that includes the full fractional seconds precision available.

The `CURRENT_TIMESTAMP()` function returns a [`TIMESTAMP WITH TIME ZONE`](../postgresql-tutorial/postgresql-timestamp) representing the date and time at which the transaction started.

## PostgreSQL CURRENT_TIMESTAMP function examples

Let's explore some examples of using the `CURRENT_TIMESTAMP` function.

### 1) Basic CURRENT_TIMESTAMP function example

The following example shows how to use the `CURRENT_TIMESTAMP()` function to get the current date and time:

```sql
SELECT CURRENT_TIMESTAMP;
```

The result is:

```text
       current_timestamp
-------------------------------
 2025-12-12 19:02:31.18598+00
(1 row)
```

The `CURRENT_TIMESTAMP()` function is equivalent to the [`NOW()`](https://neon.com/postgresql/postgresql-date-functions/postgresql-now) function as both return the timestamp at which the current transaction started.

Like the `NOW()` function, `CURRENT_TIMESTAMP()` can be used as the default value of a timestamp column.

### 2) Using the PostgreSQL CURRENT_TIMESTAMP function as the default value of a column

First, [create a table](../postgresql-tutorial/postgresql-create-table) called `note`:

```sql
CREATE TABLE note (
    id SERIAL PRIMARY KEY,
    message VARCHAR(255) NOT NULL,
    created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
```

The default value of the `created_at` column is provided by the result of the `CURRENT_TIMESTAMP()` function.

Second, [insert a new row](../postgresql-tutorial/postgresql-insert) into the `note` table:

```sql
INSERT INTO note(message)
VALUES('Testing current_timestamp function');
```

In this statement, we don't specify the value of the `created_at` column. Therefore, it takes the result of the `CURRENT_TIMESTAMP` at which the transaction started.

Third, verify the insert:

```sql
SELECT * FROM note;
```

The following picture illustrates the result:

```
 id |              message               |          created_at
----+------------------------------------+-------------------------------
  1 | Testing current_timestamp function | 2024-01-26 15:47:44.199212-07
(1 row)
```

The output indicates that the `created_at` column is populated by the date and time at which the statement was executed.

In PostgreSQL, the `TRANSACTION_TIMESTAMP()` function is synonymous with the `CURRENT_TIMESTAMP` function. However, the name of the function `TRANSACTION_TIMESTAMP` more explicitly conveys the meaning of the return value.

## Summary

- Use the PostgreSQL `CURRENT_TIMESTAMP()` to get the date and time at which the transaction starts.

---

## Related docs (Date Functions)

- [AGE](https://neon.com/postgresql/postgresql-date-functions/postgresql-age)
- [AT TIME ZONE Operator](https://neon.com/postgresql/postgresql-date-functions/postgresql-at-time-zone)
- [CLOCK_TIMESTAMP](https://neon.com/postgresql/postgresql-date-functions/postgresql-clock_timestamp)
- [CURRENT_DATE](https://neon.com/postgresql/postgresql-date-functions/postgresql-current_date)
- [CURRENT_TIME](https://neon.com/postgresql/postgresql-date-functions/postgresql-current_time)
- [DATE_PART](https://neon.com/postgresql/postgresql-date-functions/postgresql-date_part)
- [DATE_TRUNC](https://neon.com/postgresql/postgresql-date-functions/postgresql-date_trunc)
- [EXTRACT](https://neon.com/postgresql/postgresql-date-functions/postgresql-extract)
- [ISFINITE](https://neon.com/postgresql/postgresql-date-functions/postgresql-isfinite)
- [JUSTIFY_DAYS](https://neon.com/postgresql/postgresql-date-functions/postgresql-justify_days)
- [JUSTIFY_HOURS](https://neon.com/postgresql/postgresql-date-functions/postgresql-justify_hours)
- [JUSTIFY_INTERVAL](https://neon.com/postgresql/postgresql-date-functions/postgresql-justify_interval)
- [LOCALTIME](https://neon.com/postgresql/postgresql-date-functions/postgresql-localtime)
- [LOCALTIMESTAMP](https://neon.com/postgresql/postgresql-date-functions/postgresql-localtimestamp)
- [MAKE_DATE](https://neon.com/postgresql/postgresql-date-functions/postgresql-make_date)
- [MAKE_INTERVAL](https://neon.com/postgresql/postgresql-date-functions/postgresql-make_interval)
- [MAKE_TIME](https://neon.com/postgresql/postgresql-date-functions/postgresql-make_time)
- [NOW](https://neon.com/postgresql/postgresql-date-functions/postgresql-now)
- [PG_SLEEP](https://neon.com/postgresql/postgresql-date-functions/postgresql-pg_sleep)
- [STATEMENT_TIMESTAMP](https://neon.com/postgresql/postgresql-date-functions/postgresql-statement_timestamp)
- [TIMEOFDAY](https://neon.com/postgresql/postgresql-date-functions/postgresql-timeofday)
- [TO_DATE](https://neon.com/postgresql/postgresql-date-functions/postgresql-to_date)
- [TO_TIMESTAMP](https://neon.com/postgresql/postgresql-date-functions/postgresql-to_timestamp)
