Link to home
Start Free TrialLog in
Avatar of pprasadravi
pprasadravi

asked on

Date Issue with XSD

Hi
I have the following xml document and XSD.
When i load xml and xsd into dataset it is woking fine and able to sort with dataview.

Problem :
If i have date format is like mm/dd/yyyy.Then what i need to change in my xsd to accept mm/dd/yyyy format at the same same i need data type.

If i use simple type and regluar expression we can do it but will lost the datatype.I can format but ican't sort.

So how can i solve this issue.

               <SummaryInformation >
                    <PickupDate>2003-02-02</PickupDate>
                    <IncentiveCredit>-231.08</IncentiveCredit>
                    <BilledCharges>724.67</BilledCharges>
               </SummaryInformation>


>


<?xml version="1.0" standalone="yes" ?>
<xs:schema id="main" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
      <xs:element name="main" msdata:IsDataSet="true">
            <xs:complexType>
                  <xs:choice maxOccurs="unbounded">
                        <xs:element name="SummaryInformation">
                              <xs:complexType>
                                    <xs:sequence>
                                          <xs:element name="PickupDate" type="xs:date" minOccurs="0" />
                                          <xs:element name="IncentiveCredit" type="xs:decimal" minOccurs="0" />
                                          <xs:element name="BilledCharges" type="xs:decimal" minOccurs="0" />
                                    </xs:sequence>
                              </xs:complexType>
                        </xs:element>
                  </xs:choice>
            </xs:complexType>
      </xs:element>
</xs:schema>
ASKER CERTIFIED SOLUTION
Avatar of J_Mak
J_Mak

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial