I want to get a set of records all from the same month and I only have the month and year to give to MySQL and the date in the table is in the standard MySQL format (yyyy-mm-dd) ?
Thanks,
- dstefani
finding a date with month year
Moderator: General Moderators
Re: finding a date with month year
Does that mean the type of the file is DATE or DATETIME?dstefani wrote:and the date in the table is in the standard MySQL format (yyyy-mm-dd) ?
if you have e.g. month=3 and year=2007 you can create a query like
Code: Select all
WHERE datefield > '2007-03-01' and datefield < '2007-04-01'