How to Get Numeric Year, Month, Day from a Date in Oracle PL/SQL

Use the Oracle PL/SQL “Extract” function to extract the Year, Month, Day into separate columns for sorting/grouping:

<pre>
select 
   EXTRACT(YEAR FROM Creation_Date) as Year, 
   EXTRACT(MONTH FROM Creation_Date) as Month, 
   EXTRACT(DAY FROM Creation_Date) as Day, 
   Creation_Date 
from PO.PO_HEADERS_INTERFACE  POI
</pre>

Uncategorized  

Leave a Reply