next_day
function
Applies to: Databricks SQL Databricks Runtime
Returns the first date which is later than expr
and named as in dayOfWeek
.
Returns
A DATE.
dayOfWeek must be one of the following (case insensitive):
'SU'
,'SUN'
,'SUNDAY'
'MO'
,'MON'
,'MONDAY'
'TU'
,'TUE'
,'TUESDAY'
'WE'
,'WED'
,'WEDNESDAY'
'TH'
,'THU'
,'THURSDAY'
'FR'
,'FRI'
,'FRIDAY'
'SA'
,'SAT'
,'SATURDAY'
Note
In Databricks Runtime, if spark.sql.ansi.enabled is false
, the function returns NULL
instead of an error for a malformed dayOfWeek
.