public System.DateTime LatestEditedTime { get; set; }
public
string LatestEditedTimeValue
{
get
{
if (LatestEditedTime.ToString("yyyy-MM-dd HH:mm:ss").Equals
("1900-01-01 00:00:00"))
{
return "
";
}
else
{
return LatestEditedTime.ToString("yyyy-MM-dd HH:mm:ss"); ;
}
}
}
public System.Decimal Similarity { get; set; }
public string SimilarityVaule
{
get { return
Similarity == -1 ? "" : Similarity.ToString("0%"); }
}
对数据库中时间为空的处理和数据转换成百分数,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/q101301/p/3719320.html