Using xml: Format date in linq query WP7 on newest questions tagged xml – Stack Overflow

I have a linq query showing below

    XDocument data = XDocument.Parse(xml);

            var persons = from query in data.Descendants("Table")
                          select new MailList
                          {
                              Sender = (string)query.Element("FromUser"),
                              Body = (string)query.Element("Message"),

                              Date = (string)query.Element("mDate"),
                              Time = (string)query.Element("mTime"),

                          };
            EmailList.ItemsSource = persons;

I want to format the date in “MM/yy” and the time to “hh:mm”
Thank you

See Answers


source: http://stackoverflow.com/questions/10816051/format-date-in-linq-query-wp7
Using xml: using-xml



online applications demo