Aller au contenu

Convertit une date ou une date avec heure (horodatage/datetime) en nombre UInt8 contenant le numéro du jour de la semaine (le lundi vaut 1 et le dimanche 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>)
Arguments Description
<expr> date/horodatage

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