Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime
Returns the date numDays before startDate.
Syntax
date_sub(startDate, numDays)
Arguments
startDate: A DATE expression.numDays: An INTEGER expression.
Returns
A DATE.
If numDays is negative abs(num_days) are added to startDate.
If the result date overflows the date range the function raises an error.
Examples
> SELECT date_sub('2016-07-30', 1);
2016-07-29