Ir al contenido

Convierte una fecha, o fecha con hora (marca de tiempo/datetime), en un número UInt8 que contiene el número del día de la semana (el lunes es 1 y el domingo es 7).

func.to_day_of_week(<expr>)
func.to_day_of_week('2023-11-12 09:38:18.165575')
┌────────────────────────────────────────────────────┐
│ func.to_day_of_week('2023-11-12 09:38:18.165575') │
│ UInt8 │
├────────────────────────────────────────────────────┤
│ 7 │
└────────────────────────────────────────────────────┘
TO_DAY_OF_WEEK(<expr>)
Argumentos Descripción
<expr> fecha/marca de tiempo

``TINYINT`

SELECT
to_day_of_week('2023-11-12 09:38:18.165575')
┌──────────────────────────────────────────────┐
│ to_day_of_week('2023-11-12 09:38:18.165575') │
│ UInt8 │
├──────────────────────────────────────────────┤
│ 7 │
└──────────────────────────────────────────────┘