Functions to convert DATE to string

This commit is contained in:
Jan Kvetina 2021-12-25 10:51:52 +01:00
parent 2f82a7c2bb
commit 7d1b595eb1
2 changed files with 46 additions and 0 deletions

View File

@ -453,6 +453,28 @@ CREATE OR REPLACE PACKAGE app AS
--
--
--
FUNCTION get_date (
in_date DATE := NULL,
in_format VARCHAR2 := NULL
)
RETURN VARCHAR2;
--
--
--
FUNCTION get_date_time (
in_date DATE := NULL,
in_format VARCHAR2 := NULL
)
RETURN VARCHAR2;
--
-- Set item
--

View File

@ -993,6 +993,30 @@ CREATE OR REPLACE PACKAGE BODY app AS
FUNCTION get_date (
in_date DATE := NULL,
in_format VARCHAR2 := NULL
)
RETURN VARCHAR2
AS
BEGIN
RETURN TO_CHAR(COALESCE(in_date, SYSDATE), NVL(in_format, app.format_date));
END;
FUNCTION get_date_time (
in_date DATE := NULL,
in_format VARCHAR2 := NULL
)
RETURN VARCHAR2
AS
BEGIN
RETURN TO_CHAR(COALESCE(in_date, SYSDATE), NVL(in_format, app.format_date_time));
END;
PROCEDURE set_item (
in_name VARCHAR2,
in_value VARCHAR2 := NULL,