How can I use any character, at the place of space, in MySQL TIMESTAMP to distinguish between date and time parts?


We can use the only character ‘T’ (in Capital form only) at the place of space between date and time part. It can be elucidated with the help of the following example −

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)

varun
varun

e

Updated on: 29-Jan-2020

74 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements