In MariaDB, CURDATE()
is a built-in date and time function that returns the current date.
The date is returned in either 'YYYY-MM-DD'
or YYYYMMDD
, depending on whether the function is being used in a string or numeric context.
In MariaDB, CURDATE()
is a built-in date and time function that returns the current date.
The date is returned in either 'YYYY-MM-DD'
or YYYYMMDD
, depending on whether the function is being used in a string or numeric context.
In MariaDB, CONVERT_TZ()
is a built-in date and time function that converts a datetime value from one time zone to another.
When you call the function, you pass three arguments: the time, the time zone to convert from, and the time zone to convert to.
Continue readingIn MariaDB, ADDTIME()
is a built-in date and time function that adds an amount to a time or datetime expression.
It allows you to change a time or datetime expression by passing that expression, as well as a time expression to add to that expression. You can pass a negative amount if you need to subtract from the time expression.
Continue readingIn MariaDB, SUBTIME()
is a built-in date and time function that subtracts an amount from a time or datetime expression.
It allows you to change a time or datetime expression by passing that expression, as well as a time expression to subtract from that expression. You can pass a negative amount if you need to add to the time expression.
Continue readingIn 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.
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.
Continue readingIn 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.
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.
Continue readingIn 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.
Continue readingIn MariaDB, the REGEXP_SUBSTR()
function returns the substring that matches the given regular expression pattern.
If there’s no match (i.e. the input string doesn’t contain the substring), the result is an empty string.
Continue reading