APeterson
Member since Dec 11, 2008
- Profile: /members/2412-apeterson.htm
- URL: http://www.realizeddesign.com/
- Comments: 1
Recent Blog Comments By APeterson
-
Getting Only the Date Part of a Date/Time Stamp in SQL Server
Posted on Sep 20, 2007 at 9:24 PM
yikes, use this, and drop all that cast and floor stuff. create function DateOnly(@DateTime DateTime) -- Returns @DateTime at midnight; i.e., it removes the time portion of a DateTime value. returns datetime as begin return dateadd(dd,0, datediff(dd,0,@DateTime)) end go reference: h... read more »