check if a DateTime value is over midnight

Giganews Newsgroups
Subject: check if a DateTime value is over midnight
Posted by:  Fiaola (teeleaf967…@gmail.com)
Date: Thu, 28 Oct 2010

I'm trying to write an SQL Query in SQL Server 2008 to update a date
field in my table. The field is a DATETIME field type.  When a record
is inserted and it is over midnight (lets' say between MIDNIGHT 00:00
AM AND 03:00 AM, i want to store the previous Date.

Any help would be appreciated.  Thanks in ADVANCE

Replies