Convert datetime to varchar as yyyyMMdd in SQL Server

SELECT 
  CONVERT(CHAR(8), [datetimecolumn], 112)
FROM [table]
More info about CONVERT

Comments

Popular posts from this blog

Tibco Rendezvous (tibrv) C# .Net example

Parse XML to dynamic object in C#