我有一个 linq 查询显示如下
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;
我想将日期格式化为“MM/yy”,将时间格式化为“hh:mm”谢谢