whats the base datatype of the field?if its datetime useDATENAME(year,datefield) + '-' + DATENAME(quarter,datefield) AS [YYYY-quater]DATENAME(year,datefield) + '-' + RIGHT('00' + CAST(DATEPART(month,datefield) AS varchar(2)),2) + '-' + DATENAME(week,datefield) AS [YYYY-MM-Week]
otherwise you need to first convert it to date before you apply above logic------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs