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
Asked
Active
Viewed 45 times
-2

Hamza Afzal
- 65
- 2
- 8
-
Posting code as images is frowned upon and will likely lead to downvotes. Saying it's not working without explaining how it's not working will lead to close votes as per *Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: **How to create a Minimal, Complete, and Verifiable example.*** I'd suggest you edit your question accordingly. – MikeT Apr 16 '18 at 01:35
1 Answers
0
Try this:
c.add(Calendar.DAY_OF_MONTH, 42);
c.add(Calendar.DAY_OF_MONTH, 70);

Zilan Pattni
- 236
- 1
- 9