Cloud
make_interval
The make_interval() function creates an interval value from years, months, weeks, days, hours, minutes, and seconds fields.
Syntax
Arguments are positional. Provide as many as you need, starting from years; you can’t skip a field to supply a later one:
MAKE_INTERVAL()
MAKE_INTERVAL(years)
MAKE_INTERVAL(years, months)
MAKE_INTERVAL(years, months, weeks)
MAKE_INTERVAL(years, months, weeks, days)
MAKE_INTERVAL(years, months, weeks, days, hours)
MAKE_INTERVAL(years, months, weeks, days, hours, minutes)
MAKE_INTERVAL(years, months, weeks, days, hours, minutes, seconds)
Arguments
-
years,months,weeks,days,hours,minutes: Integers. Each defaults to0when omitted. -
seconds: A floating-point number (supports fractional seconds). Defaults to0when omitted.
Examples
Was this helpful?