You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Christian Geuer-Pollmann <ma...@nue.et-inf.uni-siegen.de> on 2002/01/21 08:46:00 UTC
How to create a Schema-Conformant Date
Hi all,
I have a java.util.Date Object and I want to set an xsd:dateTime attribute
based on that (and of course create a Date object by parsing the
Attribute).
How can I do that? The following seems not to be the right solution:
Date now = new Date(System.currentTimeMillis());
element.setAttribute("Date", now.toString());
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org