Convert dd-M-yyyy to mySQL datetime

I have a MySQL varchar column full with dates stored in dd-M-yyyy format. E.g:

Row 1: 12-jan-2010
Row 2: 23-jun-2016

What's the best way to convert this to mySQL datetime format using php?

Answers


Can be done without using php:

update myTable set newcol = STR_TO_DATE(oldcol, '%d-%M-%Y')

Need Your Help

Dart language support in IOS and Chrome

android ios google-chrome dart

I'm exploring Dart an exciting new language from Google and I might create a simple web application using this language.

The need of at least one state of the art project

architecture

  I want to talk to one of my current employers about the need of having, at least one state of the art project, keeping in mind that this company have some very bad projects, bad when you

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.