snowflake.snowpark.types.DayTimeIntervalType¶

class snowflake.snowpark.types.DayTimeIntervalType(start_field: Optional[int] = None, end_field: Optional[int] = None)[source]¶

Bases: _AnsiIntervalType

DayTimeIntervalType data type. This maps to the INTERVAL DAY TO SECOND data type in Snowflake.

Parameters:
  • start_field – The start field of the interval (0=DAY, 1=HOUR, 2=MINUTE, 3=SECOND)

  • end_field – The end field of the interval (0=DAY, 1=HOUR, 2=MINUTE, 3=SECOND)

Notes

DayTimeIntervalType is currently in private preview since 1.38.0. It needs to be enabled by setting parameters FEATURE_INTERVAL_TYPES to ENABLED.

DayTimeIntervalType is currently not supported in UDFs and Stored Procedures.

Methods

jsonValue()

json_value()

simpleString()

simple_string()

Attributes

DAY

Constant representing the DAY field for interval start/end positions

HOUR

Constant representing the HOUR field for interval start/end positions

MINUTE

SECOND