WEEKS_SUB

Learn how to use the WEEKS_SUB date/time function in PlaidCloud Lakehouse. Subtracts a specified number of weeks from a date - with syntax and examples.

Subtracts a specified number of weeks from a date.

Analyze Syntax

func.weeks_sub(<date>, <n>)

Analyze Examples

func.weeks_sub('2024-01-15', 2)

┌──────────────┐
 '2024-01-01'  
└──────────────┘

SQL Syntax

WEEKS_SUB(<date>, <n>)

SQL Examples

SELECT WEEKS_SUB('2024-01-15', 2);

┌────────────┐
 2024-01-01  
└────────────┘