How to Remove Time from Current Date Function in SQL Query?
Hi,
I'm writing a query that counts rows where the value in a date column is equal to today. When I use getdate(), today(), current_date(), etc I get a total of 0, because all of those functions return the exact current date and time, whereas the values in my date column are just dates with no time. For example:
SELECT COUNT(*)
FROM table_name
WHERE date_column = today()
How can I make the today() function, or any other current date function, return just today's date with no time?
Thanks