title: Passing Date Datatype MM/dd/yyyy from ASP.NET to Select WHERE CLAUSE in SQL Server Datetime Datatype yyyy-MM-dd hh:mm:ss
body: <p>I have an issue to <code>SELECT</code> parameter type <code>Date</code> from my ASP.NET VB Application to SQL Server datatype <code>DateTime</code></p>
  
  <pre><code>    Dim strQuery As String = "SELECT CONVERT(DATE, CHECKIN) FROM VW_CHECKPOINT2 WHERE CHECKIN = @p1"
      Dim dt As DateTime = DateTime.ParseExact(CHECKIN, "MM/dd/yyyy", CultureInfo.InvariantCulture)
      Dim reformatted As String = dt.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)
  </code></pre>
  
  <p>but it's still no records to display even i passing a true date. what i'm doing wrong here? thanks</p>