Lijina
Lijina

Reputation: 297

How To Return all Record Entered between Two Dates(SQL)

I am Working On A winform..For Binding Values to a grid, I want to take all the records from Database which are created between two dates. How Can i Do This Suppose i want to return the Name,Age of all the Students Who has joined School between 01-12-2011 and 1-01-2012 ..Please help

Upvotes: 0

Views: 137

Answers (1)

Oleg Dok
Oleg Dok

Reputation: 21766

SELECT Name, Age
FROM Students
WHERE 
    DateIn >= '20111201' 
AND DateIn < '20120101'

Upvotes: 1

Related Questions