-4

I want to access data from database between two dates, Date format is yyyy/mm/dd. I tried a lot of queries but not succeed.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    Please include the query you attempted and do tell us the database you are using (e.g. MySQL, SQL Server, etc.). – Tim Biegeleisen Aug 30 '16 at 15:20
  • Tag the database which you using and show what you've tried – Sankar Aug 30 '16 at 15:20
  • Possible duplicate of [SQL query to select dates between two dates](http://stackoverflow.com/questions/5125076/sql-query-to-select-dates-between-two-dates) – David Aug 30 '16 at 15:22

2 Answers2

0

IF you are using just vanilla sql it would just be something alone the lines of

select x from table where datecolumn between 'xdate' and 'ydate'.

Do you have a date column in the table you are looking at correct?

Shark50521
  • 13
  • 1
  • 6
0

Try following query to get data between the range:

SELECT  *
FROM    Table_Name
WHERE   From_date >= '2016-08-01' AND
        To_date   <= '2016-08-30'
Neeraj Kumar
  • 771
  • 2
  • 16
  • 37