Posts

Showing posts with the label ADD MONTHS

Let's review ADD_MONTHS!

Image
ADD_MONTHS Syntax : ADD_MONTHS ( start date, number of months ) Parameters : Start date is the date before adding number of months to it. number of months are the months to be added in start date. Return type:  The ADD_MONTHS function returns date value. Usage:  According to company's policy, HR Manager evaluates the progress of each employee exactly after 6 months from the joining date. Manager wants all the dates on which evaluation of each employee has been done. Manager to data analyst: Bring me the list of all employees with their first evaluation date. Data analyst runs below query to fetch the required data. SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME, ADD_MONTHS(HIRE_DATE, 6) AS EVALUATION_DATE FROM EMPLOYEES;