MONTH Function - SQL Server to MariaDB Migration

In SQL Server and MariaDB, the MONTH function extracts the month number from the datetime.

SQL Server:

  -- Get the month
  SELECT MONTH('2024-10-24');
  # 10

MariaDB:

  -- Get the month
  SELECT MONTH('2024-10-24');
  # 10

For more information, see SQL Server to MariaDB Migration.