This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hello all!! how is everybody doing?? hey, i have a query regarding calendar dates. is there any way to gat caendar dates for the previous week/previous month using java.util package(i.e. if today it is 19/02/2002,how do we get exactly a week's prior date 12/02/2002 )? thanks in advance lusha
Hi, import java.sql.Timestamp class below line of code will take current time in millisecond and sub one week time in millisecond. this will give a time sttamp object which now will be one week old date. Which you can use Timestamp ts=new Timestamp( System.currentTimeMillis() - (24*60*60*7*1000)); System.out.println(ts); try for month (need to take care of varing no of days of month) -arun [ February 19, 2002: Message edited by: Arun Boraiah ]