I would like to build a query that will pull the number of rows that were created on a given date range and time frame. In other words. the date range would be for a given month, but I only want the rows that were created during a given time (say from 08:00 – 17:00) for each day throughout that month.
Is this easily possible?
I was thinking subqueries for each day, but didn’t know if there was an easier way.
This would give you what you want, I think. You could make a stored procedure or function out of it and pass in the start/end dates and start/end hour (now fixed). Note the strictly less than on the end date. You could also use less than or equal to ‘8/31/2009 11:59:59’.