Voici mon code :
$NouveauxProduits->date_heure permet de récupérer la date dans un champ de type timestamp au format anlgais.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <?php foreach($this->liste2 as $NouveauxProduits) : ?> <tr class="<?php if ($i % 2 == 0) {echo "ligneImpaire";} else {echo "lignePaire";}; ?>"> <td><?php echo $this->escape($NouveauxProduits->ref);?></td> <td><?php echo $this->escape($NouveauxProduits->indice);?></td> <td><?php echo $this->escape($NouveauxProduits->famille);?></td> <td><?php echo $this->escape($NouveauxProduits->client);?></td> <td><?php echo $this->escape($NouveauxProduits->date_heure);?></td> </tr> <?php $i++;?> <?php endforeach; ?>
Je voudrais faire la transformation au format dd-mm-yyyy en éliminant le temps.
Merci
Partager