こんにちは皆さん、日付のみを表示するにはどうすればよいですか。temp.StartDate.Date は機能しません。2012 年 3 月 5 日 12:00:00 と表示されます。
私は試した
temp.StartDate.Date
temp.StartDate
temp.StartDate.ToShortDateString
temp.StartDate.Date.ToShortDateString
これが私のコードです
List<DateTime> dateList = new List<DateTime>();
foreach(sMedication temp in medicationList)
{
if (dateList.Contains(temp.StartDate.Date))
{
}
else
{
dateList.Add((temp.StartDate.Date));
}
}
lstboxSchedule.ItemsSource = date
リスト;