Donc j'ai un champ:
<label><i class="icon-calendar-7"></i> A partir du</label><input name="date_job" class="date-pick form-control" data-date-format="D, d M" type="text">
et coté requete: ( je ne m'ai que l'essentiel )//conversion de la date debut du format fr(jj:mm:aaaa hh:mm:ss) en format us(aaaa-mm-jj hh:mm:ss)
$date_debut = date_create_from_format('d/m/Y', $_POST['date_job']);
$date_debut = date_format($date_debut, 'Y-m-d');
// Insertion
$req = $bdd->prepare('INSERT INTO offres (date_job) VALUES(:date_job)');
$req->execute(array(
'date_job'=>$date_debut
)) or die('Problème lors de l\'insertion');
}
problème est que la date ne s'integre pas j'ai le retour suivant :Warning: date_format() expects parameter 1 to be DateTimeInterface, boolean given in C:\wamp\www\job\deposer-un-job.php on line 84
soit ma ligne :
$date_debut = date_create_from_format('d/m/Y', $_POST['date_job']);
$date_debut = date_format($date_debut, 'Y-m-d');