This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple Date/Time format question

 
Chintan B Shah
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Have lost touch of writing core Java code for a while now..so please bear with me.

I have a date/timestring which needs to be converted to XMLGregorianCalendar.

Following is code I am using



The output as I am viewing on web-page is coming out to "04/30/2011 1:22 AM".

What am I doing wrong? Any help is appreciated.

Thanks
Chintan.
 
Matthew Brown
Bartender
Posts: 4549
8
Java Netbeans IDE Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that's the right code? Where is today defined? And since you've created two Calendars there with different dates, which one are you outputting?
 
Chintan B Shah
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matthew,
sorry my bad.
Its actually

And since you've created two Calendars there with different dates, which one are you outputting?

I am outputting "calendar".

sorry for being not clear.

Thanks
Chintan.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic