-1
select * from matchdate
where (matchdate) = DATEADD(DAY, +2, getdate())
PM 77-1
  • 12,933
  • 21
  • 68
  • 111

2 Answers2

0

You want an inequality:

where matchdate >= convert(date, getdate()) and
      matchdate < convert(date, DATEADD(DAY, +2, getdate()))

This assumes that you want calendar days. If you want 48 hours:

where matchdate >= getdate() and
      matchdate < DATEADD(hour, 48, getdate())
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
0

1st You should not call table with same column name in it, next time try something with T_matchdate as table. 2nd not equal but greater

select * 
from (select * from matchdate)T_matchdate 
where matchdate > DATEADD(DAY, +2, getdate()) 
and matchdate <= GetDate()

You can try to find date by more SQLish way

select * 
from (select * from matchdate) T_matchdate 
where (matchdate) > sysdate 
and  matchdate < sysdate+2
ImmoXZ
  • 75
  • 1
  • 8