Przejdź do głównej zawartości

Zaokrągla w dół datę z czasem (timestamp/datetime) do początku sekundy.

func.to_start_of_second(<expr>)
func.to_start_of_second('2023-11-12 09:38:18.165575')
┌────────────────────────────────────────────────────────────────┐
│ func.to_start_of_second('2023-11-12 09:38:18.165575') │
│ Timestamp │
├────────────────────────────────────────────────────────────────┤
│ 2023-11-12 09:38:18 │
└────────────────────────────────────────────────────────────────┘
TO_START_OF_SECOND(<expr>)
Argumenty Opis
<expr> timestamp

TIMESTAMP, zwraca datę w formacie „YYYY-MM-DD hh:mm:ss.ffffff”.

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