• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

rendering calendar object

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Obtain a Date object from the calendar and use that for display.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic