You want to convert a date into a nicely formatted string value. For example, you are converting a legacy application from another database vendor into a web-based Oracle application. A few of the fields on the web form are dates. The users of the application expect to see the dates in a specific format, so you need the dates to be formatted in a particular manner for display.
TO_CHAR function using the date masks. The
TO_CHAR function offers many formatting options for returning a string from a
DATE value. The following function accepts an
EMPLOYEE_ID value and returns a representation of the
HIRE_DATE spelled out.
CREATE OR REPLACE PROCEDURE obtain_emp_hire_date(emp_id IN NUMBER)