TO_START_OF_MONTH (Lakehouse v1)
Arrondit une date ou une date avec heure (horodatage/datetime) au premier jour du mois. Renvoie la date.
Syntaxe Analyze
Section intitulée « Syntaxe Analyze »func.to_start_of_month(<expr>)Exemples Analyze
Section intitulée « Exemples Analyze »func.to_start_of_month('2023-11-12 09:38:18.165575')
┌────────────────────────────────────────────────────────────────┐│ func.to_start_of_month('2023-11-12 09:38:18.165575') ││ Date │├────────────────────────────────────────────────────────────────┤│ 2023-11-01 │└────────────────────────────────────────────────────────────────┘Syntaxe SQL
Section intitulée « Syntaxe SQL »TO_START_OF_MONTH(<expr>)Arguments
Section intitulée « Arguments »| Arguments | Description |
|---|---|
<expr> |
date/horodatage |
Type de retour
Section intitulée « Type de retour »DATE, renvoie la date au format « YYYY-MM-DD ».
Exemples SQL
Section intitulée « Exemples SQL »SELECT to_start_of_month('2023-11-12 09:38:18.165575')
┌─────────────────────────────────────────────────┐│ to_start_of_month('2023-11-12 09:38:18.165575') ││ Date │├─────────────────────────────────────────────────┤│ 2023-11-01 │└─────────────────────────────────────────────────┘