DATEADD_UDF (DATE, FLOAT)

Definition

This user-defined function (UDF) is used in cases when there is an addition between a date and a type as float or timestamp.

PUBLIC.DATEADD_UDF(FIRST_PARAM DATE, SECOND_PARAM FLOAT)

Parameters

FIRST_PARAM DATE

The date to be added with the number in the second parameter.

SECOND_PARAM FLOAT

The float number that is going to be added with the first date parameter.

Returns

Returns the addition between the date and the float number specified.

Migration example

Input:

IN -> Oracle_01.sql
SELECT TO_DATE('05/11/21', 'dd/mm/yy') + 3.4 from dual;

Output:

OUT -> Oracle_01.sql
SELECT
PUBLIC.DATEADD_UDF( TO_DATE('05/11/21', 'dd/mm/yy'), 3.4) from dual;

Usage example

Input:

SELECT DATEADD_UDF('2022-02-14',6);

Output:

2022-02-20

Last updated