I have a DataTable whose data is being fed into a Class:
MyProperty = myDataRow.GetFieldValue("MyPropertyColumn", DataUtils.NullDateTime);
Property MyProperty is a Nullable DateTime and the value of the column is:
'2010-09-27 00:00:00.000' AS 'MyPropertyColumn',
When the debugger steps over the first line of code above, MyProperty is null when I expect it to be set to the DateTime from the DataTable. Is there any reason why this date isn’t being parsed correctly?
The column value needs to be passed in as a DateTime and not a string, thus: