格式化时间NULL - FormatFullDateTimeNullByExpress
2017-02-26 20:40:44 访问(1380) 赞(0) 踩(0)
/// <summary>
/// 格式化时间NULL - FormatFullDateTimeNullByExpress
/// </summary>
/// <param name="theValue"></param>
/// <param name="strExpress"></param>
/// <returns></returns>
public string FormatFullDateTimeNullByExpress(DateTime? theValue, string strExpress)
{
if (theValue == null)
return "";
if (strExpress == null || strExpress.Length == 0)
return theValue.Value.ToString();
else
return theValue.Value.ToString(strExpress);
}
标签:
格式化时间NULL - FormatFullDateTimeNullByExpress 


上一条:
下一条:
相关评论
发表评论