I'm trying to create a search form and I need to compare selected date with the others dates in database. The selected date has this format **(dd/mm/yyyy)** and the dates saved in database have this format **(mm-dd-yyy)**

```
$qb = $this->createQueryBuilder('t')
        ->leftJoin('t.image', 'i')->addSelect('i')
        ->leftJoin('t.country', 'country')->addSelect('country')
        ->leftJoin('t.destination', 'destination')->addSelect('destination')
        ->leftJoin('t.airport', 'airport')->addSelect('airport')
        ->Where('t.agence = :agence')
        ->setParameter('agence', $agence);
   //.........

    if (!empty($departureDate)) {
        $qb->andWhere('t.departureDate <= :departureDate')
            ->setParameter('departureDate', new \Datetime($departureDate));
    }
return $qb;

```

this query show me this error if the selected day is **upper of 13**

```
DateTime::__construct() [<a href='datetime.--construct'>datetime.--construct</a>]: Failed 
to parse time string (13/02/2015) at position 0 (1): Unexpected character

```

and if it is **less of 13** , the query does not give me the correct results