In SQL Server and MariaDB, the YEAR function extracts the year number from the datetime.
SQL Server:
-- Get the year SELECT YEAR('2024-10-24'); # 2024
MariaDB:
-- Get the year SELECT YEAR('2024-10-24'); # 2024
For more information, see SQL Server to MariaDB Migration.