Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query
optimization, and usability that you won’t want to miss.
Return a format string for the specified datetime type and standard. The result format string can be used with DATE_FORMAT and STR_TO_DATE.
GET_FORMAT ({DATE | DATETIME | DATE}, {'EUR' | 'ISO' | 'JIS' | 'USA' | 'INTERNAL'})
A format string. See DATE_FORMAT for a description of format symbols.
select GET_FORMAT(DATE, 'USA');
+-------------------------+
| GET_FORMAT(DATE, 'USA') |
+-------------------------+
| %m.%d.%Y |
+-------------------------+
select GET_FORMAT(DATETIME, 'INTERNAL');
+----------------------------------+
| GET_FORMAT(DATETIME, 'INTERNAL') |
+----------------------------------+
| %Y%m%d%H%i%s |
+----------------------------------+
Related Topics