extract(century from date/timestamp)



Let us now check the extract(century) function with the following query.

Query

default> select extract(century from date '2016-08-11') as century;  

Result

The above query will generate the following result.

century 
------------------------------- 
21.0

The query extracts century from the given date. 2016 belongs to the twenty-first century so, the result is 21.

apache_tajo_datetime_functions.htm
Advertisements