Sunday, September 13, 2015
How to Select Year Only From Date in SQL
Select Only Year From Date in Oracle SqlIf you want to select only Year in the date below query is the solution for you:
select to_char(REQ_DATE, 'YYYY') as Ye from tbl_pr_data where to_char(REQ_DATE, 'YYYY')='2015';
Note:
REQ_DATE is Coulumn Name
tbl_pr_data is Table Name
In the above select query just i have select the year of 2015 from the table using where Condition.
How to Select Year Only From Date in ...