Hello everyone,
i have a problem with the subtracting a DATETIME column with todays DATETIME.
One of the columns has the HireDate
(Date of hiring a certain employee). I want to know how many Years they are employed.
Thank you in advance!
I tried:
SELECT LastName, HireDate, DATE('now'), DATE('now' - HireDate)
FROM employees
or
SELECT LastName, HireDate, DATE('now'), DATE(DATE('now' - HireDate)
FROM employees
I expected: The diffrence, so the time they were hired at the company I got: negative numbers...