Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rendering calendar object

 
Ashita Singh
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65226
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "no luck" mean? Please be complete in your postings. What did happen?
 
Ashita Singh
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65226
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65226
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obtain a Date object from the calendar and use that for display.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65226
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am new to forums. this is my first post. will be more careful. thanks for the help.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic