DATEADD_UDF (FLOAT, TIMESTAMP)

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Definition

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

PUBLIC.DATEADD_UDF(FIRST_PARAM FLOAT, SECOND_PARAM TIMESTAMP)

Parameters

FIRST_PARAM FLOAT

The timestamp number that is going to be added with the second float parameter.

SECOND_PARAM DATE

The float number to be added with the timestamp in the first parameter.

Returns

Returns a timestamp with the addition between the timestamp and the float number specified.

Usage example

Input:

SELECT DATEADD_UDF(1, current_timestamp);

Output:

2024-01-30 18:47:16.988

Last updated