title: if else statement between datetime but disregard time
body: <p>Can you help me in removing the time in my code or rather correct my code for possible errors.
  Thanks. Here's my code and ill state the error later.</p>
  
  <pre><code>else if (this.dateTimePicker1.Value != DateTime.Now)
                      {
                          this.chkBxLessNinety.Enabled = false;
                          string dateInString = Convert.ToString(Convert.ToDateTime(_dr[4]));
                          DateTime startdate = DateTime.Parse(dateInString);
                          DateTime datelimit = startdate.AddDays(90);
                          //string date = Convert.ToString(Convert.ToDateTime(datelimit.Date).ToString("mm/dd/yyyy"));
  
                          string mydate1 = this.dateTimePicker1.Value.ToShortDateString();
                          if (mydate1 &gt; datelimit)
                          {
                              MessageBox.Show("Cannot Sync data more or equal to 90 days");
                          }
                          else
                          {
                          }
  </code></pre>
  
  <p>the line if (mydate1 > datelimit) shows an error which says > cannot be applied as operand of type string an datetime.</p>
  
  <p>Please help.
  Thanks in advance.</p>