MONTH_SHORT_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

Determines the short name of a month either in uppercase, lowercase, or capitalized.

PUBLIC.MONTH_SHORT_UDF(INPUT TIMESTAMP_TZ, RESULTCASE VARCHAR)

Parameters

INPUT TIMESTAMP_TZ

The date to take the short name of the month.

RESULTCASE VARCHAR

The case result to be represented, accepted values are 'uppercase', 'lowercase', and 'firstOnly'.

Returns

A varchar which is the short name of a month.

Usage example

Input:

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

Output:

OCT
oct
Oct

Last updated