Mega Code Archive

 
Categories / MySQL / Date Time
 

Using Patterns with Non-String Values

Function value test                     Pattern match test YEAR(d) = 1976                          d LIKE '1976-%' MONTH(d) = 4                            d LIKE '%-04-%' DAYOFMONTH(d) = 1                       d LIKE '%-01'