Pleasure resort of Gleam™

DATEPART(Quarter, GETDATE())

Example:
DECLARE @Quarter VARCHAR(5)
SET @Quarter = CAST(DATEPART(Year, GETDATE()) AS VARCHAR) + CAST(DATEPART(Quarter, GETDATE()) AS VARCHAR)
SELECT @Quarter AS Q


Ref:
    DATEPART

'Dev & Mng' 카테고리의 다른 글

SQL Server 실전 묻고 답하기  (0) 2008.03.19
Get Quarter in MS-SQL Server  (0) 2008.02.12
Database procedure list in MS-SQL Server  (0) 2008.02.12
Java with UTF-8  (0) 2008.02.12

Comment +0