sql get date only code example
Example 1: sql getdate date only
-- MS SQL Server
SELECT CAST(getdate() AS date);
SELECT CAST(getdate() AS varchar(10));
Example 2: how to select only a certain date sql
SELECT *
FROM sales
WHERE salesDate BETWEEN '11/11/2010 00:00:00.00' AND '11/11/2010 23:59:59.999'