- SET QUOTED_IDENTIFIER OFF
- GO
- SET ANSI_NULLS OFF
- GO
-
-
- CREATE FUNCTION [dbo].[AddDateTimeDuree] (@Dt Datetime, @an int=0, @mois int=0, @jour int=0,@heure int=0, @minute int=0, @seconde int=0)
- RETURNS DateTime AS
- BEGIN
-
- DECLARE @Ret Datetime
-
-
- IF @Dt is null
- SET @Ret = NULL
- ELSE
- SET @Ret = dateadd(second,isnull(@seconde,0),dateadd(minute,isnull(@minute,0),dateadd(hour,isnull(@heure,0),dateadd(day, isnull(@jour,0), dateadd(month, isnull(@mois,0), dateadd(year, isnull(@an,0), @Dt))))))
-
- return @Ret
- END
-
- GO
- SET QUOTED_IDENTIFIER OFF
- GO
- SET ANSI_NULLS ON
- GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE FUNCTION [dbo].[AddDateTimeDuree] (@Dt Datetime, @an int=0, @mois int=0, @jour int=0,@heure int=0, @minute int=0, @seconde int=0)
RETURNS DateTime AS
BEGIN
DECLARE @Ret Datetime
IF @Dt is null
SET @Ret = NULL
ELSE
SET @Ret = dateadd(second,isnull(@seconde,0),dateadd(minute,isnull(@minute,0),dateadd(hour,isnull(@heure,0),dateadd(day, isnull(@jour,0), dateadd(month, isnull(@mois,0), dateadd(year, isnull(@an,0), @Dt))))))
return @Ret
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO