title: Cannot implicitly convert type 'System.DateTime?' to 'int?' C# Linq
body: <p>The Code: It highlights the bottom most part where I can trying to tell Linq to find the shipto column and update the datetimestamp on the other table by a certain amount of minutes and tells me that I cannot implicitly convert type 'System.DateTime?' to 'int?' and I am unsure of how to continue... </p>
  
  <pre><code>  var TestingLinq = (from a in db.shp_master
                       join b in db.shp_status on a.serialnbr equals b.serialnbr into b_join
                       from b in b_join.DefaultIfEmpty()
                       where
                                 a.shipto == "1022a" &amp;&amp;
                                 a.status == "s" &amp;&amp;
                                 b.status == "s" &amp;&amp;
                                 a.shpreq == 0
                       group new {a, b} by new {
                                 a.serialnbr,
                                 a.trailer,
                                 a.shipto
                       } into g
                       orderby
                                 g.Key.serialnbr
                       select new RecieveTruck {
                                 SerialNumber = g.Key.serialnbr,
                                 TrailerNumber = (g.Key.trailer ?? "N/A"),
                                 Shipped = g.Min(p =&gt; p.b.datetimestamp),
                                 ETA = 
                                 g.Key.shipto == "1026" ? (System.DateTime?)Convert.ToDateTime(g.Min(p =&gt; p.b.datetimestamp)).AddMinutes(180) :
                                 g.Key.shipto == "2020" ? (System.DateTime?)Convert.ToDateTime(g.Min(p =&gt; p.b.datetimestamp)).AddMinutes(195) :
                                 g.Key.shipto == "2017" ? (System.DateTime?)Convert.ToDateTime(g.Min(p =&gt; p.b.datetimestamp)).AddMinutes(180) : 
                                 g.Key.shipto == "nor" ? (System.DateTime?)Convert.ToDateTime(g.Min(p =&gt; p.b.datetimestamp)).AddMinutes(180) : null
                       });
    return View(TestingLinq);
  </code></pre>
  
  <p>Gives me the error in the title....
  I was trying to convert this SQL Query to Linq:</p>
  
  <pre><code>SELECT a.serialnbr, ISNULL(a.trailer, 'N/A') AS 'trailer', MIN(b.datetimestamp) AS 'datetimestamp', 
               CASE WHEN a.shipto = '1026' THEN DATEADD(mi, 180, MIN(b.datetimestamp)) 
                    WHEN a.shipto = '2020' THEN DATEADD(mi, 195, MIN(b.datetimestamp)) 
                    WHEN a.shipto = '2017' THEN DATEADD(mi, 180, MIN(b.datetimestamp)) 
                    WHEN a.shipto = 'nor' THEN DATEADD(mi, 180, MIN(b.datetimestamp)) 
                    ELSE NULL END AS 'eta' 
               FROM shp_master AS a LEFT OUTER JOIN shp_status AS b ON a.serialnbr = b.serialnbr 
               WHERE a.shipto = '1022a' AND a.status = 's' AND b.status = 's' AND a.shpreq = 0 
               GROUP BY a.serialnbr, a.trailer, shipto 
               ORDER BY a.serialnbr    
  </code></pre>