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

Home  >  Article  >  Database  >  How to differentiate date and time parts using arbitrary characters at spaces in MySQL TIMESTAMP?

How to differentiate date and time parts using arbitrary characters at spaces in MySQL TIMESTAMP?

王林
王林forward
2023-09-01 22:29:08930browse

如何在 MySQL TIMESTAMP 中的空格处使用任意字符来区分日期和时间部分?

We can use the only character "T" (uppercase only) for the space between the date and time parts. This can be clarified with the help of the following examples -

mysql> Select TIMESTAMP('2017-10-20T06:10:36');
+----------------------------------+
| TIMESTAMP('2017-10-20T06:10:36') |
+----------------------------------+
| 2017-10-20 06:10:36              |
+----------------------------------+
1 row in set (0.00 sec)

The above is the detailed content of How to differentiate date and time parts using arbitrary characters at spaces in MySQL TIMESTAMP?. 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