Here is a quick tutorial:
SELECT *, CONCAT(LEFT(DateRegular,4),"-",SUBSTRING(DateRegular,5,2),"-",RIGHT(DateRegular,2)) AS myDateRegularized FROM myCoolTableName WHERE ShortName NOT IN (SELECT employee_shortName FROM employee) AND LENGTH(DateRegular) >= 1 AND ( CONCAT(LEFT(DateRegular,4),"-",SUBSTRING(DateRegular,5,2),"-",RIGHT(DateRegular,2)) >= "2007-07-08" AND CONCAT(LEFT(DateRegular,4),"-",SUBSTRING(DateRegular,5,2),"-",RIGHT(DateRegular,2)) <= "2007-08-31" ) |
very interesting, but I don’t agree with you
Idetrorce
hehe Idetroce!!!!
who are you?!
http://digg.com/comedy/Who_is_Idetrorce
http://angryseafood.com/2007/12/15/who-is-idetrorce/
Note that there are also shorter versions of function SUBSTRING, that act identically:
SELECT MID(‘LongStringThatYouLike’, 5, 6) AS crop;
SELECT SUBSTR(‘LongStringThatYouLike’, 5, 6) AS crop;
# result: ‘String’
Thanks Peter. MID is definitely shorter