date format in sql code example
Example 1: sql server convert string to date
Cast( '2011-07-07' as date ) as convertedDate
Example 2: SQL Date Format
SELECT FORMAT(dbo.column, 'M/dd/yyyy')
Example 3: date datatype in sql
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
Example 4: sql date format
default date format of my sql - YYYY-MM-DD