Saravanan
Saravanan

Reputation: 11592

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

I am using mysql Db. I having a field like current_date in date data type. I have thousands of data right now.

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

Is this cause any problem to do this? Suppose I changed, what about the old records?

Upvotes: 4

Views: 1899

Answers (1)

dpmguise
dpmguise

Reputation: 728

The old records will just recieve a time value of 00:00:00

At least, this is what occured for me when converting date to datetime via phpmyadmin

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

Upvotes: 2

Related Questions