• David92595 (8/14/2012)


    Either one works, I prefer to define/ know the exact time the query will be using. Which include the time being 11:59:59...

    The way I showed above does the same thing, you would be pulling all records (for example) greater than or equal to '2012-07-01 00:00:00.000' and less than '2012-08-01 00:00:00.000', there by getting all records for July 2012. Also, it won't be affected by a change in datatype. Using 11:59:59 can miss records greater 11:59:59.000 and less than 00:00:00 of the following day if your column in the comparision is defined as a datetime data type.