You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Chris Hopkins <ch...@cra.com> on 2004/10/18 20:19:36 UTC
Fraction seconds with dateTime
> Hi all -
>
> We are using the dateTime type for certain attributes in our schema and
> when we set the date/time fields the XML that gets generated has
> fractional seconds. Is there a way to avoid this somehow? Perhaps using
> the GDate/GDateBuilder...I just couldn't see a way to do it.
>
> So, instead of
>
> creationDate="2004-10-18T15:48:05.714Z"
>
> we get
>
> creationDate="2004-10-18T15:48:05Z"
>
> Thanks,
> Chris
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Fraction seconds with dateTime
Posted by Rashmi Banthia <rj...@gmail.com>.
This should work:
java.util.Calendar testdatetime = java.util.Calendar.getInstance();
testdatetime.clear();
testdatetime.set(1977,10,29,10,10,12);
//29th Oct 1977 10Hrs 10Min 12Sec
element.setTestDateTime(testdatetime);
--Rashmi
On Mon, 18 Oct 2004 14:19:36 -0400, Chris Hopkins <ch...@cra.com> wrote:
>
> > Hi all -
> >
> > We are using the dateTime type for certain attributes in our schema and
> > when we set the date/time fields the XML that gets generated has
> > fractional seconds. Is there a way to avoid this somehow? Perhaps using
> > the GDate/GDateBuilder...I just couldn't see a way to do it.
> >
> > So, instead of
> >
> > creationDate="2004-10-18T15:48:05.714Z"
> >
> > we get
> >
> > creationDate="2004-10-18T15:48:05Z"
> >
> > Thanks,
> > Chris
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org