Oracle SQL, PLSQL, APEX How To's by Dr. S. Raghunathan - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

 

 

 

 

 

13 HOW TO RETRIEVE DATE DATA

Date is another oracle data type like any other type of varchar2, char, number but it has its own unique properties, Sysdate does not require any parameters or options will return the value of your system's current date and time,

Date arithmetic consists of addition and subtraction only, If we subtract one date from another date, it will return the value as number of days between these two dates, Likewise, if you add number of days in a given date it will return after adding no,of days given for calculation, Likewise, no, of months also can be added to a date or deduct 1 subtract no,of months from a given date, Let us see few of the date arithmetic examples:

 

13.01    How to subtract dates to find number of days

 

img7.png Number of days between sysdate 1 current date and 05-mar-1991