Changing data type from date to date / time in mysql?

I am using mysql db. I have a field of type current_date in a date data type. Now I have thousands of data.

Now I want to capture the time of the current_date field. So now I'm going to change the data type from date to date / time.

Is this causing any problems? Suppose I have changed, but what about old records?

+4
source share
1 answer

Old records will just get the time value 00:00:00

At least this is what happened to me when converting dates to datetime via phpmyadmin

Therefore, the result should be 2010/11/11 00:00:00

+2
source

All Articles