This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60774
    
  65

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.
 
jQuery in Action, 2nd edition
 
subject: converting date string into Calendar.Day of Year
 
Similar Threads
Problem with javascript dates
request.getParameter retuning null
Voucher validity
How soon does the voucher expire?
Convert String to Date