You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Samir Shah <sa...@yahoo.com> on 2003/01/06 19:21:45 UTC

Date Formatting

Hi,

I am trying to print a date on a jsp screen using the following

<bean:write name="recentProspect" property="propLcts" formatKey="date.format"/>

The property "propLcts" is a Calendar datatype

I have defined the following in the applicaitonl.resources file

date.format=MM/dd/yyyy

When the page is rendered it still renders the date as 

java.util.GregorianCalendar[time=1041400800000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=java.util.SimpleTimeZone[id=America/Chicago,offset=-21600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=3,startDay=1,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=7200000,endTimeMode=0],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2003,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=-21600000,DST_OFFSET=0]

 

How can get it to display as mm/dd/yyyy?

TIA

 


-Samir Shah


---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now