Important

Helios features are now enabled during weekly update windows and are no longer directly tied to SingleStore engine releases. Refer to the release notes to view the latest features available in your Helios cluster.

GET_FORMAT

The GET_FORMAT() function returns a format string for the specified datetime type and standard.

The result format string can be used with STR_TO_DATE and SEC_TO_TIME.

Syntax

GET_FORMAT ({DATE | DATETIME | DATE}, {'EUR' | 'ISO' | 'JIS' | 'USA' | 'INTERNAL'})

Return Type

DATE_FORMAT

Examples

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

Last modified:

Was this article helpful?