I have a basic query:
SELECT dtCreated
, bActive
, dtLastPaymentAttempt
, dtLastUpdated
, dtLastVisit
FROM Customers
WHERE (bActive = \'true\
The DATEDIFF function is use to calculate the number of days between the required date
Example if you are diff current date from given date in string format
SELECT * , DATEDIFF(CURDATE(),STR_TO_DATE('01/11/2017', '%m/%d/%Y')) AS days FROM consignments WHERE code = '1610000154'
Here, STR_TO_DATE () : Take a string and returns a date specified by a format mask;
For your example :
SELECT dtCreated
, bActive
, dtLastPaymentAttempt
, dtLastUpdated
, dtLastVisit
, DATEDIFF(dtLastUpdated, dtCreated) as Difference
FROM Customers
WHERE (bActive = 'true')
AND (dtLastUpdated > '2012-01-01 00:00:00')
Tested on mysql server 5.7.17