What MySQL returns on using any other character than ‘T’ or ‘Space’ between date and time parts?


In that case, MySQL will return all zeros at the place of time along with correct date part. An example is as follows in which we used character ‘W’ at the place of ‘T’ or ‘Space’ between date and time part −

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)

Updated on: 29-Jan-2020

36 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements