How DATE_SUB() Works in MariaDB

In MariaDB, DATE_SUB() is a built-in date and time function that allows you to subtract an amount from a 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.

Read more

How ADDDATE() Works in MariaDB

In MariaDB, ADDDATE() is a built-in date and time function that performs date arithmetic.

It allows you to change a date by specifying the date, the unit to add, and the amount to add. You can pass a negative amount if you need to subtract the date by a certain interval.

ADDDATE() also has a shortcut syntax that allows you to add a given number of days to the date.

Read more

How DATE_ADD() Works in MariaDB

In MariaDB, DATE_ADD() is a built-in date and time function that performs date arithmetic.

It allows you to change a date by specifying the date, the unit to add, and the amount to add. You can pass a negative amount if you need to subtract the date by a certain interval.

Read more

How REGEXP_REPLACE() Works in MariaDB

In MariaDB, the REGEXP_REPLACE() function replaces occurrences of the substring within a string that matches the given regular expression pattern.

The whole string is returned along with the replacements.

If there’s no match (i.e. the input string doesn’t contain the substring), the the whole string is returned unchanged.

Read more