Reputation: 9
I want to data for a specific date in SQL.
This is the structure of my db:
I want to get all rows from column 'user' from month '02' as well as day '07'
Upvotes: 0
Views: 1597
Reputation: 135
SELECT DATEPART(yyyy,clmDate) AS n_Year,
DATEPART(mm,clmDate) AS n_Month,
DATEPART(dd,clmDate) AS n_Day
FROM tblName
WHERE ' write condition'
get Only Month , date and year Details
Upvotes: 0
Reputation: 5474
select *
from datesTable
where ((DATEPART(mm, date) = 2) and (DATEPART(dd, date) = 7))
Upvotes: 1