Aller au contenu

Arrondit une date ou une date avec heure (horodatage/datetime) au lundi précédent le plus proche. Renvoie la date.

func.to_monday(<expr>)
func.to_monday('2023-11-12 09:38:18.165575')
┌────────────────────────────────────────────────────┐
│ func.to_monday('2023-11-12 09:38:18.165575') │
│ Date │
├────────────────────────────────────────────────────┤
│ 2023-11-06 │
└────────────────────────────────────────────────────┘
TO_MONDAY(<expr>)
Arguments Description
<expr> date/horodatage

DATE, renvoie la date au format « YYYY-MM-DD ».

SELECT
to_monday('2023-11-12 09:38:18.165575')
┌─────────────────────────────────────────┐
│ to_monday('2023-11-12 09:38:18.165575') │
│ Date │
├─────────────────────────────────────────┤
│ 2023-11-06 │
└─────────────────────────────────────────┘