• Post Reply Bookmark Topic Watch Topic
  • New Topic

converting date string into Calendar.Day of Year  RSS feed

 
Kevin Brewer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does anybody know how to convert a date string into Calendar Day of Year
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66261
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General (Intermediate)
bear
 
Greg Reinl
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This method is one way to do it. It converts a String in MM/dd/yyyy to the int vlaue of the day of the year.

To make vary this approach to fit your needs, see the API doco on SimpleDateFormat.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!