set @StartDate='2016-05-13 10:53:07.913' set @b='2016-05-23 10:53:07.913' if(@StartDate<=@b) begin set @abc=(SELECT DATEADD(day,-1,'2016-05-23 10:53:07.913' )) (SELECT DATEADD(Month,-1,'2016-05-23 10:53:07.913' )) end else begin set @b=@b end declare @q int=( select DATEDIFF(dd,'2016-05-13 10:53:07.913','2016-05-23 10:53:07.913')) select @q
DECLARE @Date1 DATETIME = N'2016-05-23 10:53:07.913' SELECT DATEADD(DAY, -1, @Date1)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)