Here are two more examples.
To display the day, month and year, you can use:
select STR_TO_DATE('14/02/2015', '%d/%m/%Y');
What produces:
2015-02-14
To also display time, you can use:
select STR_TO_DATE('14/02/2017 23:38:12', '%d/%m/%Y %T');
What produces:
2017-02-14 23:38:12
aalhanane Feb 16 '17 at 22:54 2017-02-16 22:54
source share