The TO_CHAR()
function has beeen introduced in MariaDB 10.6.1.
According to the MariaDB documentation, the TO_CHAR()
function will be introduced in MariaDB 10.6.1 to enhance Oracle compatibility. The TO_CHAR()
entry was added to the documentation a couple of days ago.
According this JIRA entry, the feature is currently still in progress. JIRA is the tool that tracks bugs and feature requests in MariaDB.
Oracle has a TO_CHAR()
function and it appears that MariaDB’s new addition will make it more compatible with code being ported from Oracle.
As of this writing, the syntax for the MariaDB TO_CHAR()
function will go like this:
TO_CHAR(expr[, fmt])
Where expr
is the date/time/timestamp expression, and fmt
is an optional format to convert it to. Also, it appears that MariaDB’s TO_CHAR()
function won’t support numeric values (whereas, Oracle’s TO_CHAR()
function does).