Hi everyone,
I want to make a query using SQL statement for dates
I understand how get this for text values but I have issues to state this for dates:
************************************************** **************
SELECT Acciones_Query.Responsable_Accion, Nz(DCount("*","Acciones_Query","Responsable_Accion = """ & [Responsable_Accion] & """ AND Estatus_Accion = 'Complete'"),0) AS Complete, Nz(DCount("*","Acciones_Query","Responsable_Accion = """ & [Responsable_Accion] & """ AND Estatus_Accion = 'In Progress'"),0) AS Pending
FROM Acciones_Query
WHERE (((Acciones_Query.Fecha_Accion) Between [Start Date] And [End Date]))
GROUP BY Acciones_Query.Responsable_Accion;
************************************************** **************
I want to distribute on this way but with the statement above
************************************************** ***************
SELECT Format([Fecha_Accion],"mmmm yyyy") AS Periodo, Count(*) AS Cantidad
FROM Acciones_Query
GROUP BY Format([Fecha_Accion],"mmmm yyyy")
ORDER BY First(Acciones_Query.Fecha_Accion);
************************************************** ***************
Thanks for the help!!