Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

converting a date in jsp  RSS feed

 
Kevin Brewer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp tag that returns the last modified date in the following format.
<content:collection-modified dateformat="h:mm a, MMMM d, yyyy" timezone="EST"/>
I want to convert the output from this tag into a day of the year(java.util.Calendar.DAY_OF_YEAR).
example 277
is there any suggestion on how to perform this.
///this is my code that does not work.
<%
java.util.GregorianCalendar collcal = new java.util.GregorianCalendar();
collcal.setTime(<content:collection-modified dateformat="h:mm a, MMMM d, yyyy" timezone="EST"/> ;
int CollectionDate = collcal.get(java.util.Calendar.DAY_OF_YEAR);
%>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!