Skip to main content
Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.


Member since Dec 11, 2008

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 »