MYSQL : changer le format d'un champs datetime dans un select

/ Published in: MySQL
Save to your folder(s)

Copy this code and paste it in your HTML
  1. SELECT DATE_FORMAT(date, '%d/%m/%Y à %H:%i:%S') AS datef FROM table;
  3. #par defaut un champs datetime est au format US, a  savoir : aaaa-mm-jj hh:mm:ss

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.