Search Results chardate_to_date
Overview
APPS.HR_DATE is a public PL/SQL utility package in the Oracle E-Business Suite Human Resources (Oracle HRMS) product family. Its stated purpose is date format conversion: it translates between the three date representations used throughout Oracle HRMS and the broader EBS code base. These representations are the Oracle native DATE datatype, a "display format" character string whose layout is governed by the session's NLS conventions, and a "canonical format" character string fixed as 'YYYY/MM/DD'. The canonical form provides a locale-neutral, sortable, and unambiguous serialization that is safe for storage in character columns, for inter-program communication, and for datastore-independent interfaces, while the display form preserves the end user's localization preferences. The package is declared AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the invoker rather than the definer, which is consistent with a low-risk, read-oriented utility that requires no privileged table access beyond session context. The source header revision (hrutldtw.pkh 120.1 dated 2005/06/15) indicates the interface has been stable across the 11i, 12.1.1, and 12.2.2 releases.
Key Procedures and Functions
The package exposes six conversion functions, organized as three logical pairs:
- CHARDATE_TO_DATE — takes a character string expressed in display format and returns an Oracle DATE. This is the standard entry point when user-entered or externally sourced text must be interpreted as a date.
- DATE_TO_CHARDATE — the inverse: converts an Oracle DATE into a character string rendered in display format, suitable for presentation to an end user.
- DATE_TO_CANONICAL — converts an Oracle DATE to the canonical string 'YYYY/MM/DD', stripped of locale-specific separators and ordering.
- CANONICAL_TO_DATE — the inverse of the above, and the function associated with the search term "canonical_to_date". It parses a 'YYYY/MM/DD' character string and returns an Oracle DATE. Because the input layout is fixed and independent of NLS settings, this function is the preferred mechanism for consuming dates that were persisted or transmitted in canonical form.
- CHARDATE_TO_CANONICAL — a convenience composition that accepts display-format characters and returns the canonical 'YYYY/MM/DD' string, effectively normalizing localized input.
- CANONICAL_TO_CHARDATE — the complementary composition that accepts a canonical string and returns a display-format string, allowing normalized values to be re-localized for presentation.
Because the supplied metadata does not include parameter lists for these functions, only their documented purpose is stated; each is described as taking a single input value and returning a single converted value.
Tables Accessed
The only documented object referenced by HR_DATE is the dynamic performance view V$NLS_PARAMETERS, accessed through an APPS synonym. This view supplies the session-level National Language Support settings — most relevantly the date format, calendar, and territory parameters — that determine how display-format character strings are interpreted and rendered. The package performs no DML against application tables; it is a pure conversion utility whose only data dependency is the session NLS configuration. This explains both its read-only character and its reliance on invoker's rights.
Usage Notes
HR_DATE would be invoked from any layer of the EBS stack that must reconcile localized date text with the canonical representation. Typical callers include Oracle Forms and OAF-based HRMS screens that capture date-charcater fields, concurrent programs and PL/SQL APIs that accept canonical date parameters, and custom or extension code interfacing with HRMS datastores. The metadata records that the package is referenced by one other package, confirming its role as a shared utility rather than an application-level API. Because canonical_to_date assumes a strict 'YYYY/MM/DD' layout, callers should apply it only to values known to be canonical, using chardate_to_date for user-facing text. Conversion behavior is sensitive to session NLS settings, so custom code should not assume a fixed display format unless the session environment is explicitly controlled.
-
PACKAGE: APPS.HR_DATE
12.1.1
-
PACKAGE: APPS.HR_DATE
12.2.2
-
PACKAGE BODY: APPS.HR_DATE
12.2.2
-
PACKAGE BODY: APPS.HR_DATE
12.1.1
-
PACKAGE: APPS.FND_DATE
12.2.2
-
PACKAGE BODY: APPS.FND_DATE
12.2.2
-
PACKAGE: APPS.FND_DATE
12.1.1
-
PACKAGE BODY: APPS.FND_DATE
12.1.1
-
APPS.HR_DATE dependencies on HR_UTIL_MISC_WEB
12.2.2
-
APPS.HR_DATE dependencies on HR_UTIL_MISC_WEB
12.1.1
-
APPS.FND_DATE dependencies on FND_DATE
12.2.2