how to get year from date in pl sql

pl Sql has function “Extract” this functions works wonders. I used it at many places in my application , i write some samples here

Years

select EXTRACT(YEAR FROM DATE ‘2008-3-17’)YEAR from dual;

Months

select EXTRACT(Month FROM DATE ‘2009-3-17’)Months from dual;

Day

select EXTRACT(day FROM DATE ‘2009-3-17′)Days from dual;

and how i used it my query

select * from tblSales_V where salesId in (select SalesId from OUTLET_SALE_V where outlet_Id =’001198’)
and EXTRACT(YEAR FROM issue_Date) = 2005

chears

alirazazaidi

Ali Raza Zaidi, Microsoft ERP Consultant, Currently working for Business Experts Gulf in United Arab Emirates. Specialized in HR & Payroll, Supply Chain and Financials modules.