Reputation: 165
When I fill my date field with 28/12/12 08:51:51 and generate an XML file, I get the output 2028-12-12T08:51:51+00:00. In my XSD file, the type of this field is set as xs:dateTime
.
The problem is that I only want the Date and Time, and not the time zone. So the output should be 2028-12-12T08:51:51
Does anybody know where this format is set?
Upvotes: 4
Views: 7960
Reputation: 18064
Use the pattern as
YYYY-MM-DDThh:mm:ss
Do this way:-
<xsd:simpleType>
<xsd:restriction base="xsd:dateTime">
<xsd:pattern value="\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d" />
</xsd:restriction>
</xsd:simpleType>
Upvotes: 1