Jump to content

Recommended Posts

I have taken over a PHP Application/Database(MySQL), the database has a field that dates are entered into and that field is currently a varchar(50) datatype. I need to change the field to a datetime datatype for search functionality purposes.

The way the data was entered originally was July 14, 2008 etc. there are over 700 records in the DB but not more than 1000.

 

Is there an easy way to write a quick conversion script and run it against the DB?

If so can some one help me out with the script or point me in the right direction to learn how to write the script.

 

Thanks in advance for your response...

Link to comment
https://forums.phpfreaks.com/topic/184499-convert-varchar-to-datetime-data-type/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.