What version of Phoenix are you using? You're probably hitting PHOENIX-2611.
On Wed, Dec 23, 2015 at 1:12 AM, Ns G <nsgns...@gmail.com> wrote: > Hi Team, > > I want to fetch records with date column between current date and a past > date. > Currently when i use between in phoenix it is not working. > > Can any one help? > > Query: > > SELECT id,to_date(SUBSTR(ID2, (LENGTH(ID2)-7), 8),'yyyyMMdd','GMT') FROM > table1 h WHERE to_date(SUBSTR(ID2, (LENGTH(ID2)-7), 8),'yyyyMMdd','GMT') > between current_date() and (current_date()-2000) > > RESULT: > > Empty result set fetched > > > Thanks, > Ns > > PS: Valid data exists in the table to satisfy the query. > > >