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

# PostgreSQL LOCALTIMESTAMP Function

**Summary**: in this tutorial, you will learn how to use the PostgreSQL `LOCALTIMESTAMP` function to return the current date and time at which the current transaction starts.

## Introduction to PostgreSQL LOCALTIMESTAMP function

The following illustrates the syntax of the `LOCALTIMESTAMP` function:

```sql
LOCALTIMESTAMP(precision)
```

The `LOCALTIMESTAMP` function accepts one argument:

**1) `precision`**

The `precision` argument specifies fractional seconds precision of the second field.

The `precision` argument is optional. If you omit it, its default value is 6.

The `LOCALTIMESTAMP` function returns a [`TIMESTAMP`](../postgresql-tutorial/postgresql-timestamp) value that represents the date and time at which the current transaction starts.

The `LOCALTIMESTAMP` function returns a `TIMESTAMP` value **without** time zone whereas the [`CURRENT_TIMESTAMP`](https://neon.com/postgresql/postgresql-date-functions/postgresql-current_timestamp) function returns a `TIMESTAMP` **with** the timezone.

## PostgreSQL LOCALTIMESTAMP function examples

Let's explore some examples of using the `LOCALTIMESTAMP` function

### 1) Basic PostgreSQL LOCALTIMESTAMP function example

The following example uses the `LOCALTIMESTAMP` function to get the current date and time of the transaction:

```sql
SELECT LOCALTIMESTAMP;
```

Output:

```
         timestamp
----------------------------
 2017-08-16 09:37:38.443431
(1 row)
```

### 2) Using PostgreSQL LOCALTIMESTAMP function with a fractional seconds precision example

To get the timestamp of the current transaction with specific fractional seconds precision, you use the `precision` argument as follows:

```sql
SELECT LOCALTIMESTAMP(2);
```

The result is:

```
       timestamp
------------------------
 2017-08-16 09:39:06.64
(1 row)
```

## Summary

- Use the PostgreSQL `LOCALTIMESTAMP` function to return the date and time at which the current 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)
- [CURRENT_TIMESTAMP](https://neon.com/postgresql/postgresql-date-functions/postgresql-current_timestamp)
- [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)
- [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)
