Quantcast
Viewing all articles
Browse latest Browse all 15728

How to read XML DateTime?

Hi, I am trying to read a simple XML file that includes DateTime like this <end>1991-03-30T23:59:59+00:00</end>

Other elements I can read like this

Code:

            Qty = nodes(i).selectSingleNode("qty").Text
The only way I can get the date is like this

Code:

            Dim nodAttrib As MSXML2.IXMLDOMNode
            Dim doc As MSXML2.DOMDocument40
            Dim nodes As MSXML2.IXMLDOMNodeList
            '
            '
            Set nodAttrib = nodes(i).selectSingleNode("end")
            If Not nodAttrib Is Nothing Then EndDate = Left$(nodAttrib.Text, 10)

There must be an easier way but I couldn't find any samples/examples. TIA, Bob.

Viewing all articles
Browse latest Browse all 15728

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>