Home > Database > Mysql Tutorial > What does MySQL return when using any character other than 'T' or 'space' between the date and time parts?

What does MySQL return when using any character other than 'T' or 'space' between the date and time parts?

WBOY
Release: 2023-09-13 10:25:05
forward
1251 people have browsed it

在日期和时间部分之间使用“T”或“空格”以外的任何其他字符时,MySQL 返回什么?

In this case, MySQL will return all zeros at the time and the correct date part. As shown below, we use the character "W" at the "T" or "Space" position between the date and time parts -

mysql> Select TIMESTAMP('2017-10-20W06:10:36');
+----------------------------------+
| TIMESTAMP('2017-10-20W06:10:36') |
+----------------------------------+
| 2017-10-20 00:00:00              |
+----------------------------------+
1 row in set, 1 warning (0.00 sec)
Copy after login

The above is the detailed content of What does MySQL return when using any character other than 'T' or 'space' between the date and time 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