Search code examples
androidsqliteandroid-studioandroid-recyclerviewsqliteopenhelper

I am getting date from sqlite using sqliteOpenHelper in Android and adding 70 days from that day


I am getting date from sqlite using sqliteOpenHelper in Android and want to add days like 42, 70 etc Getting date is fine adding 42 from current date is fine but then I add 70 thats thats not working fine. Here is the code example Adding 42

Adding 70 and 98


Solution

  • Try this:

    c.add(Calendar.DAY_OF_MONTH, 42);
    c.add(Calendar.DAY_OF_MONTH, 70);