In SQL Server, the DATETIME data type is stored as 2 4-byte integers, so they don’t have a specific formatting like this.
If you want to return the date in a specific format, you need to convert it to VARCHAR with the specified corresponding format identifier.
datetime VARCHAR DATETIME SQL Server, , SQL , . dd/mm/YYYY , mm/dd/yyyy, . :
yyyyMMdd
yyyy-MM-ddThh:mi:ss.mmm
.
INSERT MyTable (DateField) VALUES ('01/10/2010')
INSERT MyTable (DateField) VALUES ('20101001')
Update:
DATETIME (GETDATE(), , ...), , SSMS, , , , , 8 .