SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,213 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a timestamp where I want to query only based on the date and exclude time.
Try the “cast-as-date”, for example:
select *
from MyTable
where cast(column1 as date) = '2024-09-24'
where column1 is a datetime value.