You need to use .Value first (Since it’s nullable).
var shortString = yourDate.Value.ToShortDateString();
But also check that yourDate has a value:
if (yourDate.HasValue) {
var shortString = yourDate.Value.ToShortDateString();
}
You need to use .Value first (Since it’s nullable).
var shortString = yourDate.Value.ToShortDateString();
But also check that yourDate has a value:
if (yourDate.HasValue) {
var shortString = yourDate.Value.ToShortDateString();
}