Zum Inhalt springen

Wandelt ein Datum oder ein Datum mit Uhrzeit (Timestamp/Datetime) in eine UInt16-Zahl um, die den Tag des Jahres (1–366) enthält.

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>)
Argumente Beschreibung
<expr> Datum/Zeitstempel

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 │
└──────────────────────────────────────────────┘