Skip to content

Converts a date with time (timestamp/datetime) to a UInt8 number containing the number of the minute of the hour (0-59).

func.to_minute(<expr>)
func.to_minute('2023-11-12 09:38:18.165575')
┌────────────────────────────────────────────────────┐
│ func.to_minute('2023-11-12 09:38:18.165575') │
│ UInt8 │
├────────────────────────────────────────────────────┤
38
└────────────────────────────────────────────────────┘
TO_MINUTE(<expr>)
ArgumentsDescription
<expr>timestamp

TINYINT

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