Home Forums SQL Server 2008 T-SQL (SS2K8) Help with SELECT query between certain time-frame RE: Help with SELECT query between certain time-frame

  • Thank you both for the replies.

    Philip, I appreciate your response but I am looking for a solution similar to Shanu's.

    Shanu, when I run SELECT cast(dateadd(hh,23,cast(getdate()-1 as int) ) as datetime)

    It is still selecting today's date, I need yesterday's date in order for it to work correctly. I see you have the -1 in there to get yesterday's date but it isnt working.

    Thanks again.