I am trying to convert a string into a integer of the Calendar object. I get an error in the following code, could anyone help <% String s ="<content:collection-modifie-date/>"; SimpleDateFormat formatter = new SimpleDateFormat(); Date theDate = formatter.parse(s); Calendar theCalendar = formatter.getCalendar(); theCalendar.setTime(theDate); int dayOFYear = theCalendar.get(Calendar.DAY_OF_YEAR); %>
You also posted a duplicate in the JSP forum which has been moved here in the Java in General (intermediate) forum. I'm going to close this thread, people who want to help should see the other thread. Please don't post the same question in multiple forums. It creates duplicate conversations and wastes the time of the people trying to help you. Dave.
subject: coverting a string object to a Date object