Search code examples
sqloracledate-arithmetic

Return employee's who were hired in first half of the month


How can I return the employee names from table hr.employees who were hired on first half of the month, i.e. with a date of 1st to 15th of that month.


Solution

  • SELECT 
      *
    FROM
      Employee e
    WHERE
      TO_NUMBER(TO_CHAR(e.DateHired, 'DD')) <= 15