The notification utility API can be used to format a date value according to a particular calendar preference. This API is defined in a PL/SQL package called WF_NOTIFICATION_UTIL.
function GetCalendarDate (p_nid number default -1, p_date in date, p_date_format in varchar2 default null, p_addTime in boolean default false) return varchar2;
Returns the specified date value as formatted text in the specified date format, using either a notification recipient's calendar preference or the current session user's calendar preference. For example, you can call this API within PL/SQL documents used in notifications, so that the Worklist pages and e-mail notifications display date values in the appropriate format for the notification recipients.
| p_nid | Specify the notification ID if it is available. In this case, the API returns the date value according to the calendar preference of the notification recipient. If you do not specify a notification ID, the API returns the date value according to the calendar preference of the current session user. |
| p_date | The date value to format. |
| p_date_format | Optionally specify a date format mask in which to return the date value. |
| p_addTime | If the date format mask specified in the p_date_format parameter does not include a time format, you can use this parameter to specify whether to add a time element to the formatted date. Specify TRUE to add a time element based on the NLS time format of the current session, such as ' HH24:MI:SS'. Specify FALSE if you do not want to add a time element.The default value is FALSE.
Note: If the date format mask specified in the p_date_format parameter does include a time format, then the p_addTime parameter is not used. |