I am facing some challenges in validate past week data, So that i want to create a data in any of the date in each last 8 weeks.
I am using below scripts
long currentTimeInMillis = System.currentTimeMillis();
long last_week = System.currentTimeMillis() - n * 24 * 60 * 60 * 1000;
Its working upto past 3 weeks while changing 'n' value as '7', '14', '21'. I can't go backward after that. Someone pls give suggestions. Thanks in advance.