B
Bill Gower
Why won't this work? What do I need to do to make it work?
DateTime? DateMember;
if((DateTime.Parse(oldRow["datemember"].ToString) == null))
DateMember = null;
else
DateMember = DateTime.Parse(oldRow["datemember"].ToString());
The program is failing on the if saying that the null value in the field in
the table is not able to be represented as a string. Which is fine, I can
understand that, so how do I check for a field in a table for null and
assign either a null to a local variable to the field value.
Bill
DateTime? DateMember;
if((DateTime.Parse(oldRow["datemember"].ToString) == null))
DateMember = null;
else
DateMember = DateTime.Parse(oldRow["datemember"].ToString());
The program is failing on the if saying that the null value in the field in
the table is not able to be represented as a string. Which is fine, I can
understand that, so how do I check for a field in a table for null and
assign either a null to a local variable to the field value.
Bill