Querying for occurences between two times

  • Hi All,

    I have a SmallDateTime field that contains the time certain transactions happened. I need to write a stored procedure that returns the transactions that occur between two times but ignores the date. For example, all transaction that happen between 7:00:00 AM and 8:00:00 AM regardless of whether they occurred on 06/01/2010, 10/14/2018 or 12/31/2025. Can someone please point me in the right direction to find this solution?

    Cheers

    ab

  • Solved it. For anyone who comes across this issue, my solution was CONVERT(VARCHAR(10), DateTimeSecs, 108) BETWEEN '07:00:00' AND '08:00:00'.

    Cheers

    ab

  • This was removed by the editor as SPAM

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply