select extract(hour from timestamp)



現在,讓我們使用以下查詢檢查 extract(hour) 函式。

查詢

default> select extract(hour from timestamp '2016-08-11 17:17:00') as hour_field; 

結果

上述查詢將生成以下結果。

hour_field 
------------------------------- 
17.0 

查詢從給定的時間戳中提取小時。

apache_tajo_datetime_functions.htm
廣告
© . All rights reserved.