Links

MSCEWI4060

Datetime interval not supported by Snowflake.

Severity

Medium

Description

This is EWI is added to a function where one of the following datetime intervals, which are not supported by Snowflake, are found as a function parameter:
  • millisecond
  • ms
  • microsecond
  • mcs
  • tzoffset
  • tz

Code Example

Input code

SELECT
DATEPART(millisecond, getdate()),
DATEADD(tz, getdate(), 0);

Output code:

1
SELECT
2
-- ** MSC-ERROR - MSCEWI4060 - THE DATETIME INTERVAL 'millisecond' IS NOT SUPPORTED BY SNOWFLAKE **
3
--DATEPART(millisecond, CURRENT_TIMESTAMP() :: TIMESTAMP)
4
,
5
-- ** MSC-ERROR - MSCEWI4060 - THE DATETIME INTERVAL 'tz' IS NOT SUPPORTED BY SNOWFLAKE **
6
--DATEADD(tz, CURRENT_TIMESTAMP() :: TIMESTAMP, 0)

Recommendations