I have something like this:
myObj.FinishDateField = DateTime.Parse(someVar);
and in the run of the program someVar
happens to also be empty string
.
I have read posts like this one about answering similar problem: How to manage parsing an null object for DateTime to be used with ADO.NET as DBNULL
but my problem is that the myObj.FinishDateField
is some in-house type of DateTime
like this: Company.Framework.Data.DbTypes.DbDateTime
so those casts used in answer above are still failing. How can I utilize this to be on my in-house version of DateTime
?