title: "Input string was not in a correct format" error in Lambda Expression
body: <p>First I should mention that I know there are several questions similar to mine, but none of them could help me.</p>
  
  <p>I want to compare two dates which are in two different SQL table and I'm using Lambda Expression. </p>
  
  <p>My code:</p>
  
  <pre><code>var itemStartDate = new ItemsBusiness().GetList&lt;Item&gt;(i =&gt; Convert.ToInt64(i.StartDate.Replace("/", "")) &lt; Convert.ToInt64(tdpStartDate.Text.Replace("/", "")));
  </code></pre>
  
  <p>However when I run the program, this exception shows up:</p>
  
  <blockquote>
    <p>Input string was not in a correct format. When converting a string to DateTime, parse the string to take the date before putting each variable into the DateTime object.</p>
  </blockquote>
  
  <p>The line which catches the exception is in another form:</p>
  
  <pre><code>try
  {
      int inputVal = Convert.ToInt32(value.Trim().Replace("px", ""));
      myLabelWidth = inputVal.ToString();
  }
  </code></pre>
  
  <p>p.s: My dates format is like this: "2010/06/20"</p>