drsql.org

Happy Holidays - Hope you get a new table for Christmas!

Home
Design Book
DMV Book
Links
Non Database Stuff
Contact me
About
Presentations
Calendar of Events
Downloads
Code Snippets
I found myself searching for random pages in my blogs where I did some task over and over, so this page will be where I put those snippets for easy access.

 Snippet

Versions

Code

 Strip Time From Date Value

2005 and earlier 

 DATEADD(DAY, 0, DATEDIFF(DAY, 0, <dateValue>))

 

2008

CAST(<dateValue> as date)