DAYNAME_LONG_UDF

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

This is the user-defined function (UDF) overloaded with two parameters.

Definition

Returns the complete name of a day either in uppercase, lowercase, or capitalized.

PUBLIC.DAYNAME_LONG_UDF(INPUT TIMESTAMP_TZ, RESULTCASE VARCHAR)

Parameters

INPUT TIMESTAMP_TZ

The date to take the dayname from.

RESULTCASE VARCHAR

The case that the result will present.

Returns

Returns a varchar with the complete name of a day.

Usage example

Input:

SELECT PUBLIC.DAYNAME_LONG_UDF(DATE '2021-10-26', 'uppercase');
SELECT PUBLIC.DAYNAME_LONG_UDF(DATE '2021-10-26', 'lowercase');
SELECT PUBLIC.DAYNAME_LONG_UDF(DATE '2021-10-26', 'firstOnly');

Output:

'TUESDAY'
'tuesday'
'Tuesday'

Last updated