Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > SQL SERVER (TECHNET) > Datetime Selection II
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th July 09:38
stan
External User
 
Posts: 1
Default Datetime Selection II



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!
--
Stan Gosselin
  Reply With Quote


  sponsored links


2 25th July 09:38
hugo kornelis
External User
 
Posts: 1
Default Datetime Selection II



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?

--
Hugo Kornelis, SQL Server MVP
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666