Member_2_6478753
asked on
tsql check if datediff is 2 days only btween enddate and getdate
i want to use the function datediff to match all record whe have difference btween the enddate end current date is 2
for example each record has a expirydate i want to gets all records where the subscription end after 2 days
for example each record has a expirydate i want to gets all records where the subscription end after 2 days
select * from subscriptions
where datediff(d, getdate(), subscription_date) > 2
where datediff(d, getdate(), subscription_date) > 2
ASKER
i want only get if is equal to 2 !! for automatic renew the subscription
if the expiration end after 2 days i will send to the user a notification not > 2
if the expiration end after 2 days i will send to the user a notification not > 2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Select getdate+2
Select enddate-2