Yuvraj Jambhle

Yuvraj Jambhle

  • NA
  • 93
  • 8.3k

How to read Date-time from XML file content

Jun 21 2021 6:28 AM

I want to read the Date and Time from the XML file as a string. For your ref, I have attached the XML file "Lasttime.zip".

I want to read only blue background string  i.e. Date -Time "2021-06-17T15:23:25+05:30".

<?xml version="1.0" encoding="utf-8"?>
<DataSet>
  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Table">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Column1" type="xs:dateTime" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    <NewDataSet>
      <Table diffgr:id="Table1" msdata:rowOrder="0">
        <Column1>2021-06-17T15:23:25+05:30</Column1>
      </Table>
    </NewDataSet>
  </diffgr:diffgram>
</DataSet>

 


Attachment: Lasttime.zip

Answers (1)