title: Define dateTime format in xsd
body: <p>At my work we load excel files and save them in the database.<br>
  This is basically the flow:<br>
  We import data into a DataSet from an Excel file, where each sheet is loaded into its own DataTable inside the DataSet. After populating the DataDet, i want to validate the data inside the DataSet, let's say the first DataTable. I get xml from the DataTable by using WriteXml() method of the DataTable class and load this xml into an XDocument. I then use the Validate() method of the XDocument class with a predefined xsd, which is loaded into a XmlSchemaSet object.</p>
  
  <p>The problem is that the data in the excel is stored in a format that is different from the format of dateTime in xsd.<br>
  We get Excel files with datetime columns formatted like thie: <strong>'12/01/2015  12:44:45'</strong>, whereas the dateTime format in xsd should be like this: <strong>'2015-01-12T12:44:45'</strong>  </p>
  
  <p>Is it possible to define custom dateTime format in an xsd file? </p>
  
  <p>For example, instead of <strong>'2015-01-12T12:44:45'</strong>, I would like it to be  <strong>'12/01/2015  12:44:45'</strong>, so my xml element would look like this: </p>
  
  <pre><code>&lt;createDate&gt;12/01/2015  12:44:45&gt;/createDate&gt;  
  </code></pre>
  
  <p>In addition, i wouldn't mind if the <strong>time part would be ignored altogether</strong>.  </p>
  
  <p>In addition, another custom xsd format i need is like this:  <code>378,216.00</code> </p>
  
  <p>Is it possible to define it in my xsd file?  </p>
  
  <p>Here is this code where we do the validation of the xml, retrieved from the datatable  </p>
  
  <pre><code>public string[] ValidateExcelFromXsdFile(string schemaUri)
      {
          _validationErrors.Clear();
  
          var schemas = new XmlSchemaSet();
          schemas.Add("", schemaUri);
  
          var doc = XDocument.Parse(GetXml(_dataSetFromExcel.Tables[0]));
  
          doc.Validate(schemas, (sender, args) =&gt; _validationErrors.Add(args.Message));
  
          return _validationErrors.ToArray();
      }
  </code></pre>