Below is a full list of date and time locales available in MariaDB.
DBMS
Database Management Systems
How DATE_FORMAT() Works in MariaDB
In MariaDB, DATE_FORMAT() is a built-in date and time function that formats a date according to the given format string.
It requires two arguments; the date and the format string. It also accepts an optional third argument that allows you to specify the locale.
MariaDB Date Format Strings
Below is a full list of format specifiers that can be used in format strings with functions like DATE_FORMAT(), STR_TO_DATE(), and FROM_UNIXTIME() in MariaDB.
How DATEDIFF() Works in MariaDB
In MariaDB, DATEDIFF() is a built-in date and time function that returns the difference, in days, between two dates.
It accepts two arguments, both of which are date or datetime expressions. It then subtracts the second date from the first.
How DATE() Works in MariaDB
In MariaDB, DATE() is a built-in date and time function that extracts the date part of a date or datetime expression.
You pass the date/datetime expression as an argument when calling the function.
MariaDB LOCALTIMESTAMP() Explained
In MariaDB, LOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().
The NOW() function is a built-in date and time function that returns the current date and time.
The time is returned in either 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is being used in a string or numeric context.
MariaDB LOCALTIME() Explained
In MariaDB, LOCALTIME and LOCALTIME() are synonyms for NOW().
The NOW() function is a built-in date and time function that returns the current date and time.
The time is returned in either 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is being used in a string or numeric context.
MariaDB CURRENT_TIMESTAMP() Explained
In MariaDB, CURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().
The NOW() function is a built-in date and time function that returns the current date and time.
The time is returned in either 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is being used in a string or numeric context.
How NOW() Works in MariaDB
In MariaDB, NOW() is a built-in date and time function that returns the current date and time.
The return value is returned in 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is used in a string or numeric context.
The return value is expressed in the current time zone.
You also have the option of specifying the microsecond precision.
MariaDB CURRENT_TIME() Explained
In MariaDB, CURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().
The CURTIME() function is a built-in date and time function that returns the current time.
The time is returned in either 'HH:MM:SS' or HHMMSS.uuuuuu format, depending on whether the function is being used in a string or numeric context.