title: Getting "no implicit conversion between '<null>' and 'System.DateTime'" error message
body: <p>In a previous question:</p>
  
  <p><a href="https://stackoverflow.com/questions/9397960/getting-this-method-or-property-cannot-be-called-on-null-values-error">Getting &quot;This method or property cannot be called on Null values&quot; error</a></p>
  
  <p>I had a problem with the following code:</p>
  
  <pre><code>client_group_details.Add(new ClientGroupDetails(
      reader.GetString(Col2Index),
      reader.GetString(Col3Index)));
  </code></pre>
  
  <p>Where I was getting the following error:</p>
  
  <pre><code>Data is Null. This method or property cannot be called on Null values.
  </code></pre>
  
  <p>This problem was resolved using the following code:</p>
  
  <pre><code>client_group_details.Add(new ClientGroupDetails(
      reader.IsDbNull(Col2Index) ? null : reader.GetString(Col2Index),
      reader.IsDbNull(Col3Index) ? null : reader.GetString(Col3Index)));
  </code></pre>
  
  <p>I now have a similar problem with <code>GetDateTime</code> and <code>GetInt32</code>, as example is:</p>
  
  <pre><code>client_group_details.Add(new ClientGroupDetails(
      reader.GetString(Col2Index),
      reader.GetString(Col3Index),
      reader.GetDateTime(Col4Index)));
  </code></pre>
  
  <p>I tried using the following to resolve this problem, but it didn't work</p>
  
  <pre><code>client_group_details.Add(new ClientGroupDetails(
      reader.IsDbNull(Col2Index) ? null : reader.GetString(Col2Index),
      reader.IsDbNull(Col3Index) ? null : reader.GetString(Col3Index),
      reader.IsDbNull(Col2Index) ? null : reader.GetDateTime(Col4Index)));
  </code></pre>
  
  <p>It gives the error:</p>
  
  <pre><code>Compiler Error Message: CS0173: Type of conditional expression cannot be determined because there is no implicit conversion between '&lt;null&gt;' and 'System.DateTime'
  </code></pre>
  
  <p>After searching for a solution, I found: <a href="https://stackoverflow.com/questions/295833/nullable-type-issue-with-conditional-operator">Nullable type issue with ?: Conditional Operator</a>.  But when I try to use that code, I keep getting <code>) expected</code>.</p>
  
  <p>How would I resolve this problem?</p>