sql time format
snippet in sql

sql date format

user6576


  SELECT DATE_FORMAT("2017-06-15", "%Y"); 

sql time format

user391

DATE - format YYYY-MM-DD
DATETIME - format: YYYY-MM-DD HH:MI:SS
TIMESTAMP - format: YYYY-MM-DD HH:MI:SS
YEAR - format YYYY or YY