Get the date of a text in an xml tag

Hello everyone, I must extract a specific part of a string within an xml, the string is in the tag and I only have to obtain the information of the dates, that is,
This is the string

PID: 209535 // COMMISSION // Provision of services from 2021-11-08 to 2021-11-14 // Pops - Express // ID: 1944

And as a result I must obtain
2021-11-08 to 2021-11-14

may we ask you to share the XML with us. We want to checkout if e.g. additional specifics like namespaces are to handle. Thanks

Yes of course
Rappi.xml (9.2 KB)

Your XML is defining Namespaces

implement and define namespace, done as here

Access rough and quick value like:

xDoc.Descendants(xnsDefault + "Detalle").First().Value

Extraction of the dates we can use Regex:

[\d\-]+ to [\d\-]+

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.