Try this:
Make the startingDate variable nullable, like this:
DateTime? startingDate;
Now, when retrieving the value from the SqlDataReader object you need to use the IsDbNull method, which will determine if the value is NULL coming back from the database, like this:
if !reader.IsDBNull(reader.GetOrdinal("STARTINGDATE"))
{
startingDate = reader.GetDateTime(reader.GetOrdinal("STARTINGDATE"));
}
else
{
startingDate = null;
}
Note: I am not sure where you are assigning startingDate to the value read from the database, because it is not shown in the posted code. That is why I assigned it directly in my example, but you may need to adjust the placement of the example logic.