---
title: "How to select data from date range between two dates using SQL"  
description: "How to select data from date range between two dates using SQL"  
author: "Kate Smith"  
published: 2013-10-16  
updated: 2013-10-16  
canonical: https://www.mindstick.com/forum/1687/how-to-select-data-from-date-range-between-two-dates-using-sql  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# How to select data from date range between two dates using SQL

I have a [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) with Product_sales [name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) and it holds like below

Product_ID Sold_by Qty From_date To_date

1001 21 17 2013-02-05 2013-03-17

1002 78 4 2013-02-06 2013-04-11

1003 18 19 2013-01-05 2013-03-30

[Now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now) what is the [query](https://www.mindstick.com/blog/202/sub-query-in-sqlserver) if I want to [select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) [sales](https://www.mindstick.com/articles/13125/tips-to-increase-sales-of-your-woocommerce-store) [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) between two [dates](https://yourviews.mindstick.com/story/1513/7-zodiac-signs-astrology-dates-meanings-amp-compatibility) from a [date](https://yourviews.mindstick.com/story/3869/propose-day-2024-exciting-date-ideas-for-you-and-your-partner) [range](https://www.mindstick.com/articles/23243/complete-troubleshooting-tips-for-belkin-n300-range-extender-setup) ? (Like Select sales data from 2013-01-03 to 2013-01-09)

## Replies

### Reply by Andrew Deniel

You should use below line of query to get the data from between two dates

```
SELECT * FROM Product_sales WHERE From_date >= '2013-02-05' AND To_date <= '2013-04-11'
```


---

Original Source: https://www.mindstick.com/forum/1687/how-to-select-data-from-date-range-between-two-dates-using-sql

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
