title: Conversion failed when converting date and/or time from character string
body: <p>i want to insert the record in sql server . Table name and columns are specified in this code,   </p>
  
  <pre><code>      String str_date=date;
  
        DateFormat formatter ; 
  
        formatter = new SimpleDateFormat("MM/dd/yyyy");
  
        date1 = (Date)formatter.parse(str_date);  
  
        System.out.println("Today is " +date1 );
  </code></pre>
  
  <hr>
  
  <pre><code>     try{
  
        String query="INSERT INTO BULT_DATA " +
                  "(ULDT_ID" +
                  ",ULDT_DESC" +
                  ",ULDT_DT" +
                  ",ULDT_ULTH_ID" +
                  ",ULDT_DATA_FILE" +
                  ",ULDT_MAX_ROW_NO" +
                  ",ULDT_REC_STS" +
                  ",ULDT_CRE_USER_ID" +
                  ",ULDT_CRE_DT" +
                  ",ULDT_UPD_USER_ID" +
                  ",ULDT_UPD_DT" +
                  ",ULDT_APRV_USER_ID" +
                  ",ULDT_APRV_DT)" +
                  "VALUES ('"+
                  uploadID+"','"+
                  uploadDes+"','"+
                  date1+"','" +
                  templateID+"','"+
                  dataFile+"','"+
                  noRows+"','" +
                          "N','" +
                          "admin','" +
                          "2011-12-05 18:41:50.000','" +
                          "admin','" +
                          "2011-12-05 18:41:50.000','" +
                          "NULL','" +
                          "NULL')";
  
  
              System.out.println("query :: "+query);
  
          int stmnt= stmt.executeUpdate(query);
  
                   }catch (Exception e) {
  
          e.printStackTrace();
   }
  </code></pre>
  
  <p>but i got this exception</p>
  
  <p>com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting date and/or time from character string.</p>