コンテンツにスキップ

日付または日時(タイムスタンプ/datetime)を、年内の日番号(1~366)を表す UInt16 の数値に変換します。

func.to_day_of_year(<expr>)
func.to_day_of_week('2023-11-12 09:38:18.165575')
┌────────────────────────────────────────────────────┐
│ func.to_day_of_year('2023-11-12 09:38:18.165575') │
│ UInt8 │
├────────────────────────────────────────────────────┤
│ 316 │
└────────────────────────────────────────────────────┘
TO_DAY_OF_YEAR(<expr>)
引数 説明
<expr> 日付/タイムスタンプ

SMALLINT

SELECT
to_day_of_year('2023-11-12 09:38:18.165575')
┌──────────────────────────────────────────────┐
│ to_day_of_year('2023-11-12 09:38:18.165575') │
│ UInt16 │
├──────────────────────────────────────────────┤
│ 316 │
└──────────────────────────────────────────────┘