1

We have field in an XML which will have date along with Timestamp.

EX : 2016-12-22 10:36:46

and in our Schema, we have defined that element as

<xs:element name="REJECTTIME" minOccurs="0"  type="xs:datetime"/>

But we are getting a fatal error as below

Element has type={http://www.w3.org/2001/XMLSchema}datetime, which does not exist.

Robby Cornelissen
  • 91,784
  • 22
  • 134
  • 156
sreevathsa a
  • 149
  • 13

1 Answers1

1

That should be

type="xs:dateTime"
             ^

instead of

type="xs:datetime"
Robby Cornelissen
  • 91,784
  • 22
  • 134
  • 156
  • thx for the quick reply.... But xs:dateTime will accept date and time with "T" 2016-12-22T10:36:46 do we have any datetype which will accept the date and time in the below format 2016-12-22 10:36:46 – sreevathsa a Dec 26 '16 at 05:16
  • You could use a `xs:string` data type and add a `pattern` restriction. – Robby Cornelissen Dec 26 '16 at 05:59