CAST_DATE_UDF

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 here.

Returns

Returns a date with the new format applied.

Usage example

Input:

SELECT PUBLIC.CAST_DATE_UDF('2024-01-25T23:25:11.120');

Output:

2024-01-25

Last updated