Skip to main content
added 89 characters in body
Source Link
GateKiller
  • 76.3k
  • 75
  • 176
  • 204

Return Date Only

Select Cast(Floor(Cast(Getdate() As Float))As Datetime) 

or

Select DateAdd(Day, 0, DateDiff(Day, 0, Getdate())) 

Return Date Only

Select Cast(Floor(Cast(Getdate() As Float))As Datetime) 

Return Date Only

Select Cast(Floor(Cast(Getdate() As Float))As Datetime) 

or

Select DateAdd(Day, 0, DateDiff(Day, 0, Getdate())) 
Updated with shorter version.
Source Link
GateKiller
  • 76.3k
  • 75
  • 176
  • 204

Return Date Only

Select Convert([smalldatetime],floorCast(ConvertFloor([float],getdateCast(),Getdate(0) As Float)),(0)As Datetime) 

Return Date Only

Select Convert([smalldatetime],floor(Convert([float],getdate(),(0))),(0)) 

Return Date Only

Select Cast(Floor(Cast(Getdate() As Float))As Datetime) 
Post Made Community Wiki by CommunityBot
Source Link
GateKiller
  • 76.3k
  • 75
  • 176
  • 204

Return Date Only

Select Convert([smalldatetime],floor(Convert([float],getdate(),(0))),(0))