Jump to content

Using A Custom Datetime Pattern


Recommended Posts

I have a problem with a dateTime element of my schema. It will not accept my dateTime patternError message:

cvc-pattern-valid: Value '18.11.2011 01:00:00.000' is not facet-valid with respect to pattern 'DD.MM.YYYY hh:mm:ss.SSS' for type 'DateTime'
<xs:element name="modifiedTime" type="DateTime" /><xs:simpleType name="DateTime">   <xs:restriction base="xs:dateTime">     <xs:pattern value="DD.MM.YYYY hh:mm:ss.SSS" />   </xs:restriction></xs:simpleType>

If I remove the simpleType and just use dateTime as type on the element the following dateTime pattern is required and works:YYYY-MM-DDThh:mm:ssI want to use the pattern DD.MM.YYYY hh:mm:ss.SSS. How can I configure that in my schema?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...