I am about to get the substring of a list. Here is my LINQ. (Read the XML from a third-party service.)
var Payment = from Main in xml.Descendants(ns + "OTA_AirBookRQ")
select new
{
DepartureDate = Main
.Elements(ns+"Segment")
.Elements(ns+"DepartureDate")
.ToList(),
}
Payment.DepartureDate[0].Value returns a date as "2012-11-14T19:05:00". All I need to get from this is "19:05:00" . How do I achieve this?
Please let me know if you need more information.
Payment.DepartureDate[n].Value, or only for the first element?