This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date to Calendar object

 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I have a java.util.Date object storing some date.
Now i want to convert to java.util.Calendar object because most of the methods are deprecated in Date class and suggested to use Calendar class instead.
Thanks in advance.
Arun
 
Marcel de Jong
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arun,
to convert a java.util.Date to a Calendar, just get an instance of Calendar and then set the time with the method setTime(java.util.Date)
Regards,
Marcel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic