Convert into datetime MySQL format.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
oskare100
Forum Commoner
Posts: 80
Joined: Sun Oct 29, 2006 5:47 am

Convert into datetime MySQL format.

Post by oskare100 »

Hello,
I have one column with dates stored in VARCHAR like this: 14:08:41 Nov 20, 2006.

Now I need to move all rows in that table and insert them in another table where I need store the times in the datetime MySQL format.

So I need to convert all times like 14:08:41 Nov 20, 2006 into datetime like 0000-00-00 00:00:00. How can I do that?

Best Regards
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

have you tried strtotime()
Post Reply