DATEADD_UDF

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Definition

Helper function that adds two different dates

PUBLIC.DATE_ADD_UDF(FIRST_DATE DATE, SECOND_DATE DATE)

Parameters

FIRST_DATE DATE

The first date value that is to be added.

SECOND_DATE DATE

The second date value is to be added along with first_date.

Returns

A date resulting from the addition of the two parameters.

Example

Input:

SELECT 
    CAST(CAST (COLUMNB AS DATE FORMAT 'MM/DD/YYYY') AS TIMESTAMP(0))
    + 
    CAST (COLUMNA AS TIME(0) FORMAT 'HHMISS' )
FROM TIMEDIFF;

Output:

SELECT
    PUBLIC.DATEADD_UDF(CAST(CAST(COLUMNB AS DATE) /*** MSC-WARNING - MSCEWI1033 - FORMAT 'MM/DD/YYYY' REMOVED, SEMANTIC INFORMATION NOT FOUND. ***/ AS TIMESTAMP(0)), PUBLIC.TO_INTERVAL(CAST(COLUMNA AS TIME(0)) /*** MSC-WARNING - MSCEWI1033 - FORMAT 'HHMISS' REMOVED, SEMANTIC INFORMATION NOT FOUND. ***/))
    FROM
    TIMEDIFF;

Last updated