MSCEWI4060

Datetime interval not supported by Snowflake.

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

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:

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

Recommendations

Last updated