SelectTIMESTAMP('2017-10-20W06:10:36');+----- -----------------------------+|TIMESTAMP('2017-10-20W06:10:36')|+--- --------------------------"/> SelectTIMESTAMP('2017-10-20W06:10:36');+----- -----------------------------+|TIMESTAMP('2017-10-20W06:10:36')|+--- --------------------------">
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!