SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE FUNCTION [kalender].[bomonth] (@Datum AS DATE)
RETURNS DATE
AS 

BEGIN
   RETURN DATEADD(dd, 1 - Day(@Datum), @Datum)
END
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
