I have a basic query:
SELECT dtCreated , bActive , dtLastPaymentAttempt , dtLastUpdated , dtLastVisit FROM Customers WHERE (bActive = \'true\
Get No of Days between two days
DECLARE @date1 DATE='2015-01-01', @date2 DATE='2019-01-01', @Total int=null SET @Total=(SELECT DATEDIFF(DAY, @date1, @date2)) PRINT @Total