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</Pi ckupDate>
<IncentiveCredit>-231.08</ IncentiveC redit>
<BilledCharges>724.67</Bil ledCharges >
</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-ms data">
<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>
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</Pi
<IncentiveCredit>-231.08</
<BilledCharges>724.67</Bil
</SummaryInformation>
>
<?xml version="1.0" standalone="yes" ?>
<xs:schema id="main" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-
<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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.