dimanche 17 juillet 2016
MS Access SQL code check
I'm working on some SQL code, but not proficient with MS Access so wanted to make sure it would behave like I think it should.
What I'm trying to do is get a count and the hour in military time for a set of records between june 1, 2015 to may 31, 2016. I want to know how many records I have for each hour. It doesn't matter what date the record took place on just the hour.
SELECT DatePart("h",[CentralTime]) AS Expr1, Count(DatePart("h",[CentralTime])) AS Expr2
FROM Master
WHERE (((Master.CentralTime) Between #6/1/2015# And #5/31/2016#))
GROUP BY DatePart("h",[CentralTime]);
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire