Product Solutions Support
Try MemSQL

GET_FORMAT

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'})

Return Type

A format string. See DATE_FORMAT for a description of format symbols.

Examples

memsql> select GET_FORMAT(DATE, 'USA');
+-------------------------+
| GET_FORMAT(DATE, 'USA') |
+-------------------------+
| %m.%d.%Y                |
+-------------------------+

memsql> select GET_FORMAT(DATETIME, 'INTERNAL');
+----------------------------------+
| GET_FORMAT(DATETIME, 'INTERNAL') |
+----------------------------------+
| %Y%m%d%H%i%s                     |
+----------------------------------+
Was this article useful?