I have an output data class with a DateTime variable. I want to clear that to a null value in a loader class but the compiler complains with:
Cannot convert null to 'System.Data.Time' because it is a non-nullable value type.
I understand that, but if I change the type to DateTime? creating the nullable type wrapper I get:
No overload for method 'ToString' takes '1' arguments
I have an output line that reads.
ACCOUNT_ESTABLISHED_DATE.ToString("yyyy-MM-dd")
So the question is, when I set the DateTime as nullable, how do I get around the fact that is no longer behaves like a DateTime that has the formatted ToString available?