MySQL GET_FORMAT()
MySQL 날짜함수, 시간함수
GET_FORMAT()
-
GET_FORMAT({ DATE | TIME | DATETIME }, { 'EUR' | 'USA' | 'JSI' | 'ISO' | 'INTERVAL'})
Returns a format string. This function useful in combination with the DATE_FOMRAT() and the STR_TO_DATE() functions.
The possible values for the first and second arguments result in serveral possible format strings. ISO format refers to ISO 9075, not ISO 8601
흠.. 나머진 생략
mysql> SELECT DATE_FORMAT('203-10-03', GET_FORMAT(DATE, 'EUR'));
+---------------------------------------------------+
| DATE_FORMAT('203-10-03', GET_FORMAT(DATE, 'EUR')) |
+---------------------------------------------------+
| 03.10.0203 |
+---------------------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT STR_TO_DATE('10.31.2003', GET_FORMAT(DATE, 'USA'));
+----------------------------------------------------+
| STR_TO_DATE('10.31.2003', GET_FORMAT(DATE, 'USA')) |
+----------------------------------------------------+
| 2003-10-31 |
+----------------------------------------------------+
1 row in set (0.00 sec)