I wish to find all records of the current day. I have a field Date of type DATE. I am getting error on sql server
\'DATE\' is not a recognized built-in funct
As the error states, there is no DATE
function in SQL Server 2008 or 2012 (you tagged both so I'm not sure which you're targeting). You can, however, cast to a date
type in SQL Server 2008 and above:
WHERE EnterDate = CONVERT(date,GETDATE())
Note that there's no CURDATE
function either, so I've translated that to GETDATE()