title: "Error converting data type varchar to datetime"
body: <p>How can I solve the error in the following procedure?</p>
  
  <pre><code>CREATE PROCEDURE cards
      @salesman VARCHAR(10),
      @RCV10 INT,
      @RCV09 INT,
      @RCV15 INT,
      @GPRS15 INT,
      @RCV20 INT,
      @RCV25FTT INT,
      @RCV25 INT,
      @RCV31 INT,
      @RCV30 INT,
      @RCV35 INT,
      @RCV50 INT,
      @RCV55 INT,
      @SIM INT,
      @VTOPSIM INT,
      @VTOPBAL INT,
      @THREEGSIM INT,
      @entrydate DATETIME
  AS
  BEGIN
      IF EXISTS(
             SELECT *
             FROM   CardsIssued
             WHERE  salesman = @salesman
                    AND RCV10 &gt; @RCV10
                    AND RCV09 &gt; @RCV09
                    AND RCV15 &gt; @RCV15
                    AND GPRS15 &gt; @GPRS15
                    AND RCV20 &gt; @RCV20
                    AND RCV25FTT &gt; @RCV25FTT
                    AND RCV25 &gt; @RCV25
                    AND RCV31 &gt; @RCV31
                    AND RCV30 &gt; @RCV30
                    AND RCV35 &gt; @RCV35
                    AND RCV50 &gt; @RCV50
                    AND RCV55 &gt; @RCV55
                    AND SIM &gt; @SIM
                    AND VtopSim &gt; @VTOPSIM
                    AND VtopBal &gt; @VTOPBAL
                    AND ThreeGSim &gt; @THREEGSIM
                    AND EntryDate = @entrydate
         )
      BEGIN
          INSERT Cards_Returned
          VALUES
            (
              @salesman,
              @RCV10,
              @RCV09,
              @RCV15,
              @GPRS15,
              @RCV20,
              @RCV25FTT,
              @RCV25,
              @RCV31,
              @RCV30,
              @RCV35,
              @RCV50,
              @RCV55,
              @SIM,
              @VTOPSIM,
              @VTOPBAL,
              @THREEGSIM,
              @EntryDate
            )
      END
      ELSE
          PRINT'CARDS RETURNED CANNOT BE GREATER THAN CARDS ISSUED'
  END
  </code></pre>
  
  <p>Run as:</p>
  
  <pre><code>execute cards 'S001',50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,'28/1/2013'
  </code></pre>
  
  <p>gives the following error:</p>
  
  <pre><code>Msg 8114, Level 16, State 5, Procedure cards, Line 0
  Error converting data type varchar to datetime
  </code></pre>