Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

SQL query to select dates between two dates

Asked by Rahul Verma Mar 17, 2021 1.4K views 1 answer
Share

About this question

I have a start_date and end_date. I want to get the list of dates in between these two dates. Would anyone like to help me pointing out the mistake in my query.?

select Date,TotalAllowance 

from Calculation 

where EmployeeId=1

  and Date between 2011/02/25 and 2011/02/27

Here Date is a datetime variable.

Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.