0

How can get all dates between two dates in sqlite?

date from : 2014-05-01
date to : 2014-05-06

Results in rows :

2014-05-01
2014-05-02
2014-05-03
2014-05-04
2014-05-05
2014-05-06

Found same scenario but it has been done in MySQL. here

Thanks!

Community
  • 1
  • 1
jamcoder
  • 569
  • 1
  • 5
  • 18
  • What's the problem with that approach? Also, why do you need to do it in SQL - a general-purpose programming language is likely better for such work. – laalto May 17 '14 at 06:26

2 Answers2

0

can try this:

SELECT * FROM tbl where Date between fromDate and toDate

give your required value to fromDate and toDate parameters.

Dig
  • 254
  • 1
  • 9
-1

you can try like this.

SELECT * FROM table WHERE  datecol  BETWEEN '2014-05-01' AND '2014-05-06'
kablu
  • 629
  • 1
  • 7
  • 26