• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

converting date string into Calendar.Day of Year

 
Kevin Brewer
Greenhorn
Posts: 3
  • 0
  • 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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General (Intermediate)
bear
 
Greg Reinl
Ranch Hand
Posts: 45
  • 0
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic