Home > Database > Mysql Tutorial > Which punctuation mark can be used as a separator between MySQL date parts?

Which punctuation mark can be used as a separator between MySQL date parts?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-09-07 15:21:02
forward
1220 people have browsed it

哪个标点符号可以用作 MySQL 日期部分之间的分隔符?

In this matter, MySQL allows us to use the most relaxed format to date. We can use any punctuation as separator between date parts. 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)
Copy after login

The above is the detailed content of Which punctuation mark can be used as a separator between MySQL date parts?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template