I have a web application where I need to insert data in my SQL Server table, the problem is that I have this error in my Apache log:

> 
> General error: 241 Conversion failed when converting date and/or time from character string. 
> 
> 
> 

I have the same error when I try directly inside ms sql server. 
There is my php code : 

```
public function addVisiteClient(Request $request){
    require __DIR__.DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."Entity".DIRECTORY_SEPARATOR."sqlconnect.php";
      $idCli = $request->request->has("id")?$request->request->get("id"):"";
      $cadre = $request->request->has("cadre")?$request->request->get("cadre"):"";
      $type = $request->request->has("type")?$request->request->get("type"):"";
      $duree = $request->request->has("duree")?$request->request->get("duree"):"";
      $obs = $request->request->has("observation")?$request->request->get("observation"):"";
      $dateRelance = $request->request->has("dateRelance")?$request->request->has("dateRelance"):"";
      $insert = "INSERT INTO VISITE (CLCLEUNIK, DATERELANCE, DATEVIS, CADREVISITE, TYPE, DUREE, OBERSVAT) VALUES (:idCli, CONVERT(DATETIME, :dateRelance), GETDATE(), :cadre, :type, :duree, :observation)";
      $prepare=$pdo2->prepare($insert);
      $prepare->execute(array(
        ":idCli" => $idCli,
        ":dateRelance" => $dateRelance,
        ":cadre" => $cadre,
        ":type" => $type,
        ":duree" => $duree,
        ":observation" => $obs
      ));
      $prepare->closeCursor();
      return new Response("Ajout effectué");

     }

```

And there is an example of data : 

```
INSERT INTO VISITE (CLCLEUNIK, DATERELANCE, DATEVIS, CADREVISITE, TYPE, DUREE, OBERSVAT) VALUES (4080508, CONVERT(DATETIME, '2020-02-27 12:00:00'), GETDATE(), 1, 1, 10, 'test')

```