Subtracting and getting a Date Value
Am a newbie to java .....I want to subtract 7 days from a Date(Fetched from database) and have to get that subtracted date..(eg.) if my database date is 11-03-2011., i have to subtract 7 days from it. and i hav to get as 04-03-2011 as output..i tried but couldn't get it..pls help me as am new to this field...
Thanks in advance,
if you have a Date object you can create a Calendar object from that Date.
Calendar cal = new Calendar();
Thank u very much mate...that was very helpful
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)