Thursday, November 5, 2009

Getting just the date

Just because I run into this problem a million times a month and always forget the correct magic:

SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))

No comments:

Post a Comment