I really hate dealing with dates and times in queries. And again, I find myself pulling my hair our.
I need to find all completedates for yesterday, so i want from 12 Midnight to 12 Midnight. How can I do that? Here is what I am using, but its wrong. How do I normalize to
2008-06-24 00:00:00.000 to 2008-06-24 23:59:59.999
WHERE ((MESSAGESENDERCATEGORYVIEW.CompleteDATE >=getdate()-1)and (MESSAGESENDERCATEGORYVIEW.CompleteDATE <getdate())
I need to find all completedates for yesterday, so i want from 12 Midnight to 12 Midnight. How can I do that? Here is what I am using, but its wrong. How do I normalize to
2008-06-24 00:00:00.000 to 2008-06-24 23:59:59.999
WHERE ((MESSAGESENDERCATEGORYVIEW.CompleteDATE >=getdate()-1)and (MESSAGESENDERCATEGORYVIEW.CompleteDATE <getdate())