title: How to enter a Date into a table in TSQL? (Error converting data type varchar to datetime)
body: <p>I want to enter 30/10/1988 as the date to a DOB column in a table using a procedure</p>
  
  <pre><code>alter procedure addCustomer 
  @userName varchar(50),
  @userNIC varchar(50), 
  @userPassword varchar(100), 
  @userDOB datetime, 
  @userTypeID int, 
  @userEmail varchar(50), 
  @userTelephone int, 
  @userAddress char(100),
  @userCityID int,
  @status int output
  as
  
      declare @userID int
      declare @eid int
      declare @tid int
      declare @aid int
  
      execute getLastRaw 'userID','tblUserParent', @userID output
  
      insert into tblUserParent values (@userID, @userName, @userNIC, @userPassword, @userDOB, @userTypeID)
  
      execute getLastRaw 'addressID','tblAddress', @aid output
  
      insert into tblAddress values (@aid, @userAddress, @userID, @userCityID)
  
      execute getLastRaw 'emailID','tblEmail', @eid output
  
      insert into tblEmail values (@eid, @userEmail, @userID)
  
      execute getLastRaw 'telephoneID','tblTelephoneNO', @tid output
  
      insert into tblTelephoneNO values (@tid, @userTelephone , @userID)
      insert into tblUserCustomer values (@userID, @eid , @tid, @aid)
  </code></pre>
  
  <p>...but it gives an error when i enter like this '30/10/1988'</p>
  
  <p><strong>Msg 8114, Level 16, State 5, Procedure addCustomer, Line 0 Error converting data type varchar to datetime.</strong></p>
  
  <p>...but when I enter like only the 30/10/1988
  Incorrect syntax near '/'</p>
  
  <p>How do I fix this?</p>