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


Member since Aug 27, 2009

Recent Blog Comments By ExceptionalCase

  • Ask Ben: Comparing Only Times in SQL

    Posted on Aug 27, 2009 at 1:53 AM

    It doesn't work for some cases, try this example: declare @endTime datetime, @selectDate datetime set @selectDate = '2009-8-7' set @endTime = '2009-8-9 14:30:00' SET @endTime = CAST(cast(@selectDate as float) + (cast(@endTime as float) - FLOOR( CAST(@endTime AS FLOAT)))AS DATETIME) It returns '200... read more »