How to get the values between current date and current date of previous year in sqlite in Android

view story

http://stackoverflow.com – I tried to get the data from sqlite database between current date one year before. I used the following code. But it didn't provide the data. Consider the current date is 25-10-2013. There is data for 25-09-2013. But the code inside do, doesn't execute. I don't get what is wrong in the code. The same way, I used for 3 months before and 6 months before, they work fine. Calendar cal11 =Calendar.getInstance(); cal11.add(Calendar.MONTH, -12); String one_year_before = cur_format1111.format(cal11.getTime()); Log.v("one_year_before", one_year_before); Query to select data: Cursor cur21 = db.raw (HowTos)