Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Date problem

Author  Topic 

rjrferreira
Starting Member

13 Posts

Posted - 2007-06-26 : 07:44:46
I all,

I want to build a query that returns to me all lines of the table, when the startdate (it's a column) is 2 days front of today.

I tried this
select * from event where startdate = dateadd(dd,2,startdate)
and
select * from event where startdate = getdate()+2

Pleas help me

Greetings

rjrferreira
Starting Member

13 Posts

Posted - 2007-06-26 : 07:52:51
ok done!

select * from wicevent where startdate > getdate()+1 and startdate < getdate()+2
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-26 : 08:38:45

http://www.sql-server-performance.com/bs_date_time.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -