This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes converting date string into Calendar.Day of Year Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "converting date string into Calendar.Day of Year" Watch "converting date string into Calendar.Day of Year" New topic
Author

converting date string into Calendar.Day of Year

Kevin Brewer
Greenhorn

Joined: Oct 04, 2003
Posts: 3
does anybody know how to convert a date string into Calendar Day of Year
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63202
    
  69

Moving to Java in General (Intermediate)
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Greg Reinl
Ranch Hand

Joined: Feb 11, 2003
Posts: 45
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.
 
Have you checked out Aspose?
 
subject: converting date string into Calendar.Day of Year
 
It's not a secret anymore!