sql date format
snippet in sql

sql server convert string to date

user3419

Cast( '2011-07-07' as date ) as convertedDate

sql server obtener fecha en formato dd/mm/yyyy

user9003

convert( datetime, fecha, 103 )

SQL Date Format

user6783

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

sql date format

user3349


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

sql server format date

user8430

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

sql time format

user9846

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