File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Processing & Altering Date XMLGregorianCalendar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Processing & Altering Date XMLGregorianCalendar" Watch "Processing & Altering Date XMLGregorianCalendar" New topic
Author

Processing & Altering Date XMLGregorianCalendar

om ganesh
Greenhorn

Joined: Dec 06, 2006
Posts: 18
Hi All,

I am new to Java & am tring to use XMLGregorianCalendar
to
get a date in format of "2009-10-07T06:00:00+0530"

Right now am using new DatatypeFactory.newInstance().newXMLGregorianCalendar(GregorianCalendar(System.currentMilles()));

to get the date in this said format.

I am unaware of how to update the date value by a day or a minute .. using Duration API
eg ...
"2009-10-07T06:00:00+0530"
to
"2009-10-07T06:01:00+0530"

It would be good if any one can forward me some ReadMe on Java's Duration
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

You are already using a normal GregorianCalendar; pass the return value of its getTime() method to a DateFormat. You will probably want to use SimpleDateFormat as the concrete DateFormat class.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Processing & Altering Date XMLGregorianCalendar