Welcome Guest, Not a member yet? Register   Sign In
Easiest way to sort by date...
#3

[eluser]Developer13[/eluser]
If >= 2007-01-01 AND < 2007-02-01 doesn't work,then you could always use MySQL's SUBSTR() function:

Something like this should work:

SELECT * FROM table WHERE SUBSTR(date_field, 0, 7) = '2007-01';

See the following for more information:
http://dev.mysql.com/doc/refman/5.0/en/s...ion_substr


Messages In This Thread
Easiest way to sort by date... - by El Forum - 12-16-2007, 10:03 PM
Easiest way to sort by date... - by El Forum - 12-16-2007, 10:21 PM
Easiest way to sort by date... - by El Forum - 12-16-2007, 10:24 PM
Easiest way to sort by date... - by El Forum - 12-16-2007, 11:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB