Hi,
I have a requirement in my project. When I login to my application I need to fetch today's date and the corresponding Saturday's date along with it.
For eg: If I login today i.e. 06-Dec-2004, I should get this week's Sat's date i.e. 11-Dec-2004, if I login on 29-Dec-2004, I should get 01-Jan-2005.
Can someone help.
I was able to fetch today's date, please see the code below
_________________________________________________________________________
import java.util.Date;
import java.text.SimpleDateFormat;
Date d = new Date();
SimpleDateFormat df = new SimpleDateFormat();
df.applyPattern("dd MMM yyyy");
String dateAsText = df.format(d);
__________________________________________________________________________