2

Following the answer here, I'm getting the latest rows out of my table by indexing the 'date' field and querying like this:

table.orderBy({index: r.desc("date")})

How can I filter between dates if the 'date' values are implemented as strings (e.g "2013-12-31" or "2013-12-31 22:22:22")?

Community
  • 1
  • 1
Kludge
  • 2,305
  • 4
  • 18
  • 35

1 Answers1

2

The command to do this is called between you can use it like so:

table.between(date1, data2).orderBy(...)
Joe Doliner
  • 1,978
  • 14
  • 18
  • Thanks, I needed to add the index as well, like: table.between(date1, date2, {index: "date"}) @Joe Doliner – Kludge Jan 27 '14 at 16:10