Sql date format

This article is tagged with: Sql date format and mysql

SQL Date Format

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

sql date format

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

sql server format date

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

sql server date field syntax

DATE - format YYYY-MM-DD

sql time format

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

sql server format datetime to short date

CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

This article is tagged with: Sql date format and mysql