Guest User

Untitled

a guest
Feb 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. Declare @StartDate Date = DateAdd(dd, -1, GetDate())
  2.  
  3. Where SomeDATE = @StartDate
  4.  
  5. Where SomeDATE = '2018-02-21'
  6.  
  7. Declare @StartDate Date = DateAdd(dd, -2, GetDate())
  8. Declare @EndDate Date = GetDate()
  9.  
  10. Where (SomeDATE > @StartDate And SomeDATE < @EndDate)
  11.  
  12. Where SomeDATE = DateAdd(dd, -1, GetDate())
  13.  
  14. Where SomeDATE = Cast(DATEADD(dd, -1, GetDate()) As Date)
Add Comment
Please, Sign In to add comment