Groups | Blog | Home
all groups > sql server mseq > february 2006 >

sql server mseq : Datetime Selection II


Stan
2/6/2006 2:46:25 PM
I posted this earlier and got an unusable answer, so I'm trying again...
I have a table with a transaction date of datatype datetime. I need to
select all where where the transaction date is 2 days ago. If I use
"where transaction date = (getdate( ) -2)" the selection fails because of, I
think, the time portion of each field. How can I compare two datetime
datatypes based only on the date portion?
Thank you!
--
Hugo Kornelis
2/7/2006 12:35:26 AM
[quoted text, click to view]

Hi Stan,

I posted a reply to your original post, half an hour after you sent this
copy of the message (but before I saw it).

Was it useful?

--
AddThis Social Bookmark Button