StacyStacy
Programmer
How do I get those employees who were 60 years old at date of hire? the date format is: 2002-10-16 00:00:00.000
Here's that I have and it is returning everyone:
SELECT
hire_date
,birth_date
,RTRIM(last_name) AS LastName
,RTRIM(first_name)AS FirstName
,empno
FROM empper
WHERE --("empper"."birth_date") -("empper"."hire_date") < '1951'
hire_date - birth_date >= 60
ORDER BY last_name
Here's that I have and it is returning everyone:
SELECT
hire_date
,birth_date
,RTRIM(last_name) AS LastName
,RTRIM(first_name)AS FirstName
,empno
FROM empper
WHERE --("empper"."birth_date") -("empper"."hire_date") < '1951'
hire_date - birth_date >= 60
ORDER BY last_name