View Single Post
Old 01-11-2011, 07:02 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 Traxman View Post
Always let mysql do the job for you, reading a line and splitting into a variable and then put that variable directly into mysql with str_to_date is better than you are doing it,
even if you can ofcus, why reinventing the wheel ?

if you feel unsure about the functions, simple queries against mysql as example:
mysql> SELECT STR_TO_DATE('1/12/2011', '%e/%m/%Y');
+--------------------------------------+
| STR_TO_DATE('1/12/2011', '%e/%m/%Y') |
+--------------------------------------+
| 2011-12-01 |
+--------------------------------------+
1 row in set (0.00 sec)

Then you always can see how things will look like and you will learn a lot more about
mysql functions.
Ya, it makes sense looking at it, and I knew there had to be something like it kicking around. I just didn't know what to look for, heh. Thanks for the explanation. I'm still soaking up tons of new information learning my way around, but it's definitely worth the time invested.
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