05-Mar-60
13.03 How to use months_between( ) function
Finding Number of months between two dates 05-mar-2010 and 05-mar-1991
SYNTAX: select months-between( to-date('05-mar-2010'),to-date('05-mar-1991')) "No,of Months" From dual ;
RESULT : No,of Months
228
Usage of Extract function :
13.04 How to extract year from date column
SYNTAX:
select extract(YEAR from sysdate) "YEAR", extract(month from sysdate) "MONTH",
extract(DAY from sysdate) "DAY" from dual ; RESULT :
Year Month Day
- - - - - - - - - - - -
2010 6 16