Calculating 7 Days Prior for a known date?
Posted on 2002-03-14
Basically I need to know what the date was 7 days before the date I currently know.
Initially I allow the user to set the Date:
SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yy");
Date currentTime1 = new Date();
String dateString = formatter.format(currentTime1);
Then the user needs to know what the date was 7 days ago. I need to subtract 7 days from the date they confirm and in that format I have above.
Thanks to all that can help.