aspose file tools*
The moose likes JSP and the fly likes rendering calendar object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "rendering calendar object" Watch "rendering calendar object" New topic
Author

rendering calendar object

Ashita Singh
Greenhorn

Joined: Aug 14, 2008
Posts: 8
in the jsp the value is shown as:

java.util.GregorianCalendar[time=1216917842000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Chicago",offset=-21600000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/Chicago,offset=-21600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode= 0]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2008,MONTH=6,WEEK_OF_YEAR=30,WEEK_OF_MONTH=4,DAY_OF_MONTH=24,DAY_OF_YEAR=206,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=11,HOUR_OF_DAY=11,MINUTE=44,SECOND=2,MILLISECOND=0,ZONE_OFFSET=-
[ August 19, 2008: Message edited by: Ashita Singh ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61205
    
  66

What does "no luck" mean? Please be complete in your postings. What did happen?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ashita Singh
Greenhorn

Joined: Aug 14, 2008
Posts: 8
no luck means i am not able to display in the format I want "MM/dd/yyyy-HH:mm:ss"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61205
    
  66

It's best to add answers in a new reply rather than "ninja edit" your original. People coming back later that may have the same issue will be confused when replies don't seem to make sense because original posts were changed.
[ August 19, 2008: Message edited by: Bear Bibeault ]
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

What do you get? When I copy and pasted your original code (what happened to the original post??) the results are:

08/19/2008-11:31:35

Which is exactly what it should be...


Steve
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61205
    
  66

Obtain a Date object from the calendar and use that for display.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61205
    
  66

Originally posted by Steve Luke:
When I copy and pasted your original code (what happened to the original post??)
It was "ninja edited". Ashita Singh, as you can see, all that does is to cause confusion. Please don't do that in the future.
[ August 19, 2008: Message edited by: Bear Bibeault ]
Ashita Singh
Greenhorn

Joined: Aug 14, 2008
Posts: 8
am new to forums. this is my first post. will be more careful. thanks for the help.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Originally posted by Bear Bibeault:
It was "ninja edited". Ashita Singh, as you can see, all that does is to cause confusion. Please don't do that in the future.

[ August 19, 2008: Message edited by: Bear Bibeault ]


Ahh, I see. I will post the code I used then:

In the JSP I used:

Note that since you are using the pattern you would not need to use the type attribute
(and if you were to use it, then the value should be type="both" - but that is the code I
copied from the original).

I had to make a sample order which I did like this:


[ August 19, 2008: Message edited by: Steve Luke ]
[ August 19, 2008: Message edited by: Steve Luke ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rendering calendar object