如何从DateTime
获取设置属性中删除时间部分
下面的代码不起作用,我尝试了几种方法。我也试过dateValue.ToString("d")
private DateTime dateValue;
public DateTime DateValue
{
get
{
//First Try
return dateValue.ToShortDateString;
//Second Try
return dateValue.ToString("d")
//Third Try
DateTime dateValue = DateTime.????(not sure)
}
}