Last updated 1 year ago
Returns an integer that represents the month of the specified date. (MONTH in Transact-SQL).
MONTH( date )
Snowflake SQL Documentation
MONTH ( <date_or_timestamp_expr> )
Code:
SELECT MONTH('10-10-2022') AS MONTH
Result:
MONTH| -----+ 10|
SELECT MONTH('10-10-2022' :: TIMESTAMP) AS MONTH;