Snowflake Vs MS-SQL - Part 118 - Interval Data Type


Interval Data Type

In certain scenarios, a start date and an interval are available, and the end date must be derived by applying the interval to the start date.

MS-SQL Server

You can achieve this by using built-in functions like DATEADD as below:





In Snowflake, we can use a similar approach as above; however, we can use the INTERVAL DATA TYPE as follows:





For more details, refer to the Interval_DataType section.


Yogesh Shinde

Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Series

Snowflake Key Concepts

Snowflake Vs MS-SQL - Part 46 - RATIO_TO_REPORT