PLUSMINUTES
- PLUSMINUTES(time, minutes)[source]
Adds a specified number of minutes to a given time or datetime.
The PLUSMINUTES function returns a DATETIME or TIME value that is offset by the given number of minutes. If either input is an array, the function operates element-wise and returns a TIME_ARRAY or DATETIME_ARRAY. If negative minutes are provided, the function subtracts that number of minutes from the original time or datetime.
- Parameters:
time (
Operand) –The starting time or datetime to which minutes will be added. Can be a scalar or an array.
Supported types:
DATE
DATE_ARRAY
TIME
TIME_ARRAY
DATETIME
DATETIME_ARRAY
minutes (
Operand|int) –The number of minutes to add. Can be a scalar integer or INTEGER_ARRAY. If negative, the minutes are subtracted.
Supported types:
INTEGER
INTEGER_ARRAY
- Return type:
- Returns:
A Formula object representing the time or datetime after adding the specified minutes. Returns an array if any input is an array; otherwise, a scalar DATE, TIME or DATETIME.
Supported types:
DATE
DATE_ARRAY
TIME
TIME_ARRAY
DATETIME
DATETIME_ARRAY
- Raises:
ValueError – If the time input is not a valid DATE/TIME/DATETIME type or if minutes
is not an integer type. –
Examples
PLUSMINUTES(TIME(14, 30, 0), 45) # Returns a TIME representing 15:15:00