This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Simple Date/Time format question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Simple Date/Time format question" Watch "Simple Date/Time format question" New topic
Author

Simple Date/Time format question

Chintan B Shah
Ranch Hand

Joined: Sep 23, 2008
Posts: 83
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.


SCJA 1.0
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4425
    
    8

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

Joined: Sep 23, 2008
Posts: 83
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
 
subject: Simple Date/Time format question