Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT *
FROM table_name
WHERE column_name BETWEEN GETDATE() AND (GETDATE()-2)
convert(char(10),GETDATE(),101) = convert(char(10),sscreate1,101)
WHERE
sscreate1 >= convert(int,convert(floor,GetDate()))
AND sscreate1 < convert(int,convert(floor,GetDate())) + 1/code]
There are all sorts of methods you can use to convert the date+time that is GetDate() into just the part that is the date. You can use your method, too:
[code]WHERE
sscreate1 >= Convert(char(10),GetDate(),101)
AND sscreate1 < Convert(datetime,Convert(char(10),GetDate(),101)) + 1
-- 12 days ago:
WHERE
sscreate1 >= Convert(datetime,Convert(char(10),GetDate(),101)) - 12
AND sscreate1 < Convert(datetime,Convert(char(10),GetDate(),101)) - 11