asked on
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
xmlDoc.Load(ListOfFiles)
On Error Resume Next
Set node = xmlDoc.SelectSingleNode("Envelope/PurchaseOrder/Header/RequestedDate/text()")
Set node1 = xmlDoc.SelectSingleNode("Envelope/PurchaseOrder/Profile/Type/Code/text()")
DoRec = node1.NodeValue
If node > 1 Then
ReqDT = node.NodeValue
MyMonth=Month(ReqDT)'grabs month value from NewDate
MyDay=Day(ReqDT) 'grabs day value from NewDate
MyYear=Year(ReqDT) 'grabs year value from NewDate
FormattedDate=MyMonth&"/"&MyDay&"/"&MyYear 'concatinates values into a new value called FormattedDate
If FormattedDate = "12/30/1899" Then
FormattedDate = ""
End If
DataTable.Value("ReqDT","Global") = FormattedDate
End If
Err.Clear
Set node2 = xmlDoc.SelectSingleNode("Envelope/PurchaseOrder/Profile[0]/Code/text()")
DOR2 = node2.NodeValue
DataTable.Value("DOR","Global") = DOR2
002.xml