INTERVAL_MULTIPLY_UDF (VARCHAR, VARCHAR, INTEGER)

Definition

This user-defined function (UDF) is used to multiply an interval of time with a value of 'N' times.

INTERVAL_MULTIPLY_UDF
(INPUT_PART VARCHAR(30), INPUT_VALUE VARCHAR(), INPUT_MULT INTEGER)

Parameters

INPUT_PART VARCHAR

The format of the operation. E.g.: DAY, HOUR TO SECOND, YEAR TO MONTH.

INPUT_VALUE VARCHAR

The interval of time to be multiplied.

INPUT_MULT INTEGER

The time to multiply the interval of time.

Returns

Returns a varchar with the result of the multiplication.

Usage example

Input:

SELECT INTERVAL_MULTIPLY_UDF('DAY', '2', 100);

Output:

200

Last updated