sql server format date
snippet in sql

SQL Date Format

user5730

SELECT FORMAT(dbo.column, 'M/dd/yyyy')

sql date format

user7088


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

sql server format date

user790

convert (varchar , getdate()-1 , 112)

sql time format

user2151

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