Last updated 3 months ago
SQL Server
Azure Synapse Analytics
Returns an integer that represents the year of the specified date. ().
YEAR( date )
YEAR ( <date_or_timestamp_expr> )
Code:
SELECT YEAR('10-10-2022') AS YEAR
Result:
YEAR | -----+ 2022 |
SELECT YEAR('10-10-2022' :: TIMESTAMP) AS YEAR;
No issues were found.
No related EWIs.