View Single Post
Old 01-11-2011, 03:50 AM  
Angry Jew Cat - Banned for Life
(felis madjewicus)
 
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
Quote:
Originally Posted by StariaDaniel View Post
You can do it in mysql directly btw using STR_TO_DATE()

Code:
INSERT INTO ... ( ... ) VALUES ( ... , STR_TO_DATE('1/12/2011', '%e/%m/%Y') , ... )
http://dev.mysql.com/doc/refman/5.5/...on_str-to-date
Even better. That's more what I was looking for. I knew there had to be some way to handle it as a part of the insertion process. Would there be any reason to lean one way or the either between STR_TO_DATE in the insertion vs explode() and then inserting the value?
Angry Jew Cat - Banned for Life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote