SelectTIMESTAMP('2017-10-20W06:10:36');+----- -----------------------------+|TIMESTAMP('2017-10-20W06:10:36')|+--- --------------------------"/> SelectTIMESTAMP('2017-10-20W06:10:36');+----- -----------------------------+|TIMESTAMP('2017-10-20W06:10:36')|+--- --------------------------">

Home  >  Article  >  Database  >  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
WBOYforward
2023-09-13 10:25:051217browse

在日期和时间部分之间使用“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)

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete