sql - Retrieve records falling within a daily time range across a given month -


my table contains fields store

  • ticket
  • sale date/time
  • price

i need on how select tickets sold between 8:00 , 12:00 pm on day-to-day basis entire month, without including sales between 12:01 pm , 10:00 pm.

simple way deal events in given hours of day use datepart

select * tickettable datepart(hh, saledatetime) between 8 , 11 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -