Hi everyone -
I have a table that contains entries with submit dates formated as mm/dd/yyyy. I wanted to get a count of entries submited by month so I formatted the date so entries would be grouped by month like APR 2010, FEB 2010, MAR 2010 etc.
This query produces the results I want - I just can't think of a way to order the months correctly. I could use 'mm yyyy' but I still would like the results in the 'mmm yyyy' format.
Does anyone have any suggestions?
SELECT Format([Date],'mmm yyyy') AS SubmitDate, tblNonConformingMaterial.Project, Count(tblNonConformingMaterial.NCRNumber) AS CountOfNMRs
FROM tblNonConformingMaterial
GROUP BY Format([Date],'mmm yyyy'), tblNonConformingMaterial.Project
HAVING (((Format([Date],'mmm yyyy')) Like "*2010*"))
ORDER BY Format([Date],'mmm yyyy'), tblNonConformingMaterial.Project;
Thanks!
I have a table that contains entries with submit dates formated as mm/dd/yyyy. I wanted to get a count of entries submited by month so I formatted the date so entries would be grouped by month like APR 2010, FEB 2010, MAR 2010 etc.
This query produces the results I want - I just can't think of a way to order the months correctly. I could use 'mm yyyy' but I still would like the results in the 'mmm yyyy' format.
Does anyone have any suggestions?
SELECT Format([Date],'mmm yyyy') AS SubmitDate, tblNonConformingMaterial.Project, Count(tblNonConformingMaterial.NCRNumber) AS CountOfNMRs
FROM tblNonConformingMaterial
GROUP BY Format([Date],'mmm yyyy'), tblNonConformingMaterial.Project
HAVING (((Format([Date],'mmm yyyy')) Like "*2010*"))
ORDER BY Format([Date],'mmm yyyy'), tblNonConformingMaterial.Project;
Thanks!