CAST_DATE_UDF

circle-info

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 Documentationarrow-up-right

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected]envelope.

Thank you for your understanding.

Definition

The function processes a timestamp in string format to a date. It returns a date with the specified format.

PUBLIC.CAST_DATE_UDF(DATESTR STRING)

Parameters

DATESTR STRING

The date as a string to be formatted. The format should be 'YYYY-MM-DD"T"HH24:MI:SS.FF' e.g. '2024-01-25T23:25:11.120'.

Please review the following information about formatting herearrow-up-right.

Returns

Returns a date with the new format applied.

Usage example

Input:

Output:

Last updated