How to get only the date from datetime

I have listed below two solutions for extracting a date from a datetime :

Solution 1 :  SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))

Powered by CodeReview – Let's make it Better!

Solution 2 : SELECT (CAST(FLOOR(CAST(GETDATE() as FLOAT)) AS DateTime))

Lucian Leonte

MCT, MCITP, MCTS