select extract(millennium from timestamp)
Advertisements
Let us now check the extract(millenium) function with the following query.
Query
default> select extract(millennium from timestamp '2016-08-11 17:25:15') as millennium_year;
Result
The above query will generate the following result.
millennium_year ------------------------------- 3.0
The query returns the millennium for the given year 2016 and it is 3. One millennium is equal to 1000 years.
apache_tajo_datetime_functions.htm
Advertisements