Declaration
TO_DATE(string [, format])
Description
This function converts the string string to the DATE type according to the specified format. If format is omitted, the session's default date format is used.
Examples
obclient> SELECT TO_DATE('20260330', 'YYYY/MM/DD');
The returned result is as follows:
+-----------------------------------+
| TO_DATE('20260330', 'YYYY/MM/DD') |
+-----------------------------------+
| 2026-03-30 00:00:00 |
+-----------------------------------+
1 row in set