c# convert date to toshortdatestring with nullable datetime code example
Example 1: how to convert nullable datetime toshortdatestring
if (yourDate.HasValue) {
var shortString = yourDate.Value.ToShortDateString();
}
Example 2: how to convert nullable datetime toshortdatestring
DateTime? dt = (DateTime?)DateTime.Now;
string dateToday = string.Format("{0:d}", dt);