How to check if a datetime field equals current date in SQL Server Transact SQL

Had to write a SQL Server query to check if a date is the current day. After some searching I found a good way of doing it here: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=38012

SELECT * FROM table WHERE DATEDIFF(day, StartDate, GETDATE()) = 0

Comments

Popular posts from this blog

Microsoft.ApplicationBlocks. ExceptionManagement The event source x does not exist error

Apple iPad Facebook crash

DbEntityValidationException