Ir al contenido

Redondea hacia abajo una fecha con hora (marca de tiempo/datetime) al inicio del día.

func.to_start_of_day(<expr>)
func.to_start_of_day('2023-11-12 09:38:18.165575')
┌────────────────────────────────────────────────────┐
│ func.to_start_of_day('2023-11-12 09:38:18.165575') │
│ Timestamp │
├────────────────────────────────────────────────────┤
│ 2023-11-12 00:00:00 │
└────────────────────────────────────────────────────┘
TO_START_OF_DAY( <expr> )
Argumentos Descripción
<expr> marca de tiempo

TIMESTAMP, devuelve la fecha en el formato “YYYY-MM-DD hh:mm:ss.ffffff”.

SELECT
to_start_of_day('2023-11-12 09:38:18.165575')
┌───────────────────────────────────────────────┐
│ to_start_of_day('2023-11-12 09:38:18.165575') │
│ Timestamp │
├───────────────────────────────────────────────┤
│ 2023-11-12 00:00:00 │
└───────────────────────────────────────────────┘