# **CURRENT_TIMESTAMP()**

## **Function Description**

`CURRENT_TIMESTAMP` and `CURRENT_TIMESTAMP()` are synonyms for `NOW()`.

Returns the current date and time in the format of `YYYY-MM-DD hh:mm:ss` or `YYYMMDDhhmmss`, depending on whether the function is a string or a number. The value is the time zone where the current session is located.

## **Function Syntax**

```text
> CURRENT_TIMESTAMP([fsp])
```

## **Parameter definition**

| Parameters | Description |
| ---- | ---- |
|fsp | Optional. Parameter `fsp` parameter is used to specify the minute and second accuracy, with valid values of integers between 0 and 6. |

## **Example**

```text
mysql> SELECT CURRENT_TIMESTAMP();
+----------------------------------+
| current_timestamp() |
+----------------------------------+
| 2022-09-21 11:46:44.153777 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> SELECT NOW();
+----------------------------------+
| now() |
+----------------------------------+
| 2022-09-21 12:56:36.915961 |
+----------------------------------+
1 row in set (0.01 sec)
```

```text
create table t1 (a int primary key, b int, c int, d timestamp default current_timestamp);
insert into t1 select 1,1,1,now();
insert into t1 select 2,0,0,null;

mysql> select a,b,c,year(d) from t1;
+------+------+--------+
| a | b | c | year(d) |
+------+------+--------+
| 1 | 1 | 1 | 2022 |
| 2 | 0 | 0 | NULL |
+------+------+--------+
2 rows in set (0.01 sec)
```

## **limit**

The operator `+` or `-` is not now supported with `CURRENT_TIMESTAMP`.
