How to find the future date using SQL query?

573 Views Asked by At

I have over 50K people in my system with their DOB under a tablename as Employee and column_name as Birthdate. i have report to generete to find how many people did actually turned 65 until todays date,and somebody turning 65 in future months ( AUGUST, SEP, OCT and so on). can somebody please help me how would i write that query ?

1

There are 1 best solutions below

0
On

I'm not a sybase expert, but this should return all employees who are over 65 years as at 01 July 2014

select * from employee
where datediff(yy, Birthdate, "Jul 1, 2014") > 65

Source: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1550/html/blocks/X47295.htm (Google searched for sybase sql datediff)