I have stored a date in a field like this: 31st Dec 2013 but I need to alter it to something like this: 2013-12-31 00:00:00
I have tried lots of variations of DATE_FORMAT and strtotime but got nowhere. How do I go about this please?
The DATE_FORMAT() function is used to display date/time data in different formats.
Try this:
DATE_FORMAT(your_date,'%Y %m %d %T:%f')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With