How SUBDATE() Works in MariaDB

In MariaDB, SUBDATE() is a built-in date and time function that subtracts an amount from a given date.

It allows you to change a date by specifying the date, the unit to subtract, and the amount to subtract. You can pass a negative amount in order to add to the date, instead of subtracting from it.

SUBDATE() also has a shortcut syntax that allows you to specify the days to subtract.

Continue reading