title: how to retrieve values from the database(Sqlite) by using date in android?
body: <p>I have stored the date as string in sqlite database table. What i need i i have to retrieve the values which stored in last seven days. I have tried by using following but it doesn't showing any values.</p>
  
  <p>My Database function</p>
  
  <pre><code>     public Cursor paymentWeek(Activity activity)
       {
  
         String[] from = { _PAYMENTID, NAME, REQUESTEDDATE, FROMAD, TOADD, EMAILBODYPAYMENT, AMOUNT};  
  
         SQLiteDatabase db = getReadableDatabase(); 
  
         String orderby = REQUESTEDDATE+" DESC";  
  
         Cursor cursor = db.rawQuery("select * from " + PAYMENTTABLE + " where " + REQUESTEDDATE + " BETWEEN "
         + "date('now')" + " AND " + "date('now','-7 days')", null);
  
         activity.startManagingCursor(cursor);
  
         return cursor;  
      }
  
  Calling function
  
      Cursor week = db.paymentWeek(this);
                 String[] weekly = new String[] { PaymentAppDataBase.REQUESTEDDATE,PaymentAppDataBase.PAYMENTNAME,PaymentAppDataBase.AMOUNT };
                 int[] sevendays = new int[] { R.id.Date,R.id.Name,R.id.Amount };
  
                 SimpleCursorAdapter weekcursor =
                      new SimpleCursorAdapter(this, R.layout.listview, week, weekly, sevendays);
                  setListAdapter(weekcursor);
                 db.close();
  </code></pre>
  
  <p>It would be helpful if you guys sort out this problem. I get stuck over here.</p>