How to Display Date in mm/dd/yyyy format in sql server?

Displaying Date in yyyy/mm/dd format in Sql Server 2005

SELECT CONVERT(VARCHAR(19),CreatedDate,111)AS [Created Date] FROM tblSample

select convert(varchar(19),getdate(),111)



Displaying Date in mm/dd/yyyy format in Sql Server 2005

select CONVERT (CHAR(19),CreatedDate,101) AS [Created Date] FROM tblSample

select convert(varchar(19),getdate(),101)


Enjoy SQL Coding..

No comments: