Thanks Jessica, i will try that.
Sorry Joe, i know this is very trivial, but i thought it will be of no use
saying how much i have researched into solving this.
It is a simple logic behind a complex enterprise application.
I have been checking the java.util.Date API
doc for this.
Thanks.