• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get day, month, and year seperate from date  RSS feed

 
Kay Tracid
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to get day, month and year from the Date object. How can I do this?
Thanks a lot!
 
prabhat kumar
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use
Calendar.get(Calendar.DAY_OF_MONTH).
and so on
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!