PERIOD_TO_TIME_UDF

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

User-defined function (UDF) that reproduces the Teradata PERIOD TO TIME casting behavior.

PERIOD_TO_TIME_UDF(PERIOD_VAL VARCHAR(22))

Parameters

PERIOD_VAL

The PERIOD value to transform.

Returns

The TIME representation of the PERIOD or null if conversion is not possible.

Usage example

Input:

SELECT PERIOD_TO_TIME_UDF(PERIOD_UDF(CURRENT_TIME()));

Output:

08:42:04

Last updated