---

slug: /year-type
---

# YEAR type

The `YEAR` type is used to represent years in 4-digit format.

The retrieval and display format of a `YEAR` value is `YYYY`, ranging from 1901 to 2155, and 0000.

The syntax of `YEAR` is as follows:

```sql
YEAR[(4)]
```

seekdb allows you to assign values to a `YEAR` column by using a string or a number.

The input value formats supported by `YEAR` are as follows:

* A 4-digit string in the range of '1901' to '2155'.

* A 4-digit number in the range of 1901 to 2155.

* A 1- or 2-digit string in the range of '0' to '99'. seekdb converts values in the range of "0" to "69" and "70" to "99" to `YEAR` values in the range of 2000 to 2069 and 1970 to 1999, respectively.

* A 1- or 2-digit number in the range of 0 to 99. seekdb converts values in the range of 1 to 69 and 70 to 99 to `YEAR` values in the range of 2001 to 2069 and 1970 to 1999, respectively.

  If you insert the number 0, the displayed value is 0000, and the internal value is 0000. To convert it to 2000, you can specify it as the string "0" or "00".

* An expression that returns a value that can be converted to the `YEAR` type, such as `NOW()`.