LAST_DAY(hire_date)+1 : LAST_DAY « Date Timezone « Oracle PL / SQL






LAST_DAY(hire_date)+1

  
SQL>
SQL> CREATE TABLE person (
  2       person_code VARCHAR2(3),
  3       first_name  VARCHAR2(15),
  4       last_name   VARCHAR2(20),
  5       hire_date   DATE
  6       );

Table created.

SQL>
SQL> INSERT INTO person VALUES ('CA', 'Charlene', 'Atlas', '01-FEB-02');

1 row created.

SQL> INSERT INTO person VALUES ('GA', 'Gary', 'Anderson', '15-FEB-02');

1 row created.

SQL> INSERT INTO person VALUES ('BB', 'Bobby', 'Barkenhagen', '28-FEB-02');

1 row created.

SQL> INSERT INTO person VALUES ('LB', 'Laren', 'Baxter', '01-MAR-02');

1 row created.

SQL>
SQL>
SQL>
SQL> SELECT first_name,
  2         last_name,
  3         hire_date,
  4         LAST_DAY(hire_date)+1 INSURANCE_START_DATE
  5  FROM   person;

FIRST_NAME      LAST_NAME            HIRE_DATE INSURANCE
--------------- -------------------- --------- ---------
Charlene        Atlas                01-FEB-02 01-MAR-02
Gary            Anderson             15-FEB-02 01-MAR-02
Bobby           Barkenhagen          28-FEB-02 01-MAR-02
Laren           Baxter               01-MAR-02 01-APR-02

SQL>
SQL> drop table PERSON;

Table dropped.

SQL>
SQL>
SQL>

   
  








Related examples in the same category

1.LAST_DAY: Get the last day of each month
2.Simple demo for LAST_DAY function
3.Finding the last day of the month starting summer
4.Calculating the Number of Days of Summer in June
5.select last_day( date'2000-02-01' ) "Leap Yr?"
6.select last_day( sysdate ) "Last day of this month"
7.LAST_DAY(x): get the date of the last day of the month that contains x.