HOURS_SUB (Lakehouse v2)
Subtracts a specified number of hours from a datetime.
Analyze Syntax
Section titled “Analyze Syntax”func.hours_sub(<datetime>, <n>)Analyze Examples
Section titled “Analyze Examples”func.hours_sub('2024-01-01 15:00:00', 5)
┌───────────────────────┐│ '2024-01-01 10:00:00' │└───────────────────────┘SQL Syntax
Section titled “SQL Syntax”HOURS_SUB(<datetime>, <n>)SQL Examples
Section titled “SQL Examples”SELECT HOURS_SUB('2024-01-01 15:00:00', 5);
┌─────────────────────┐│ 2024-01-01 10:00:00 │└─────────────────────┘