Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
Which punctuation character can be used as the delimiter between MySQL date parts?
In this matter, MySQL permits us to use a relaxed format to date. We can use any punctuation character between date parts as a delimiter. Some examples are as follows −
mysql> Select date ('2016/10/20');
+---------------------+
| date ('2016/10/20') |
+---------------------+
| 2016-10-20 |
+---------------------+
1 row in set (0.00 sec)
mysql> Select date('2016^10^20');
+--------------------+
| date('2016^10^20') |
+--------------------+
| 2016-10-20 |
+--------------------+
1 row in set (0.00 sec)
mysql> Select date ('2016@10@20');
+---------------------+
| date ('2016@10@20') |
+---------------------+
| 2016-10-20 |
+---------------------+
1 row in set (0.00 sec)
mysql> Select date ('2016+10+20');
+---------------------+
| date ('2016+10+20') |
+---------------------+
| 2016-10-20 |
+---------------------+
1 row in set (0.00 sec) Advertisements
