Saturday, 13 December 2008

Convert datetime to varchar as yyyyMMdd in SQL Server

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

No comments:

Post a Comment