View Single Post
  #1 (permalink)  
Old 08-07-2007, 10:34 AM
garinapavan garinapavan is offline
Member
 
Join Date: Aug 2007
Posts: 5
garinapavan is on a distinguished road
DataObject with the time given by me
c.set(Calendar.HOUR,21);
c.set(Calendar.MINUTE,46);
c.set(Calendar.SECOND,20);
Date timeToRun=c.getTime();
System.out.println("date="+timeToRun);

o/p:date=Tue Aug 07 09:46:20 PDT 2007

Why is it taking the next day(In my example my todays date is aug06) date and the time specified by me.It need to be the current date and the time specified by me......... right? I see the time is set properly but when coming to date it is giving me the next day date.

Then how to get the date object witn the current date and with the time specified by me ?

Ragards
navap
Reply With Quote
Sponsored Links