DECLARE @dt DATETIME
SET @dt = GETDATE()
SELECT
CAST(CAST(YEAR(@dt) AS CHAR(4))+'0101' AS DATETIME)
AS Jahresanfang
, CAST(CAST(YEAR(@dt) AS CHAR(4))+'-12-31T23:59:59.997' AS DATETIME)
AS Jahresende
Jahresanfang Jahresende
------------------------------------------------------ ------------------------
2004-01-01 00:00:00.000 2004-12-31 23:59:59.997
(1 row(s) affected)