DBA Data[Home] [Help]

PACKAGE: APPS.WIP_DATETIMES

Source


1 PACKAGE WIP_DATETIMES AUTHID CURRENT_USER AS
2 /* $Header: wipdates.pls 115.8 2003/10/31 22:36:55 rlohani ship $ */
3 
4 /* Converts a date varchar in canonical to a date varchar
5    in user display format */
6 FUNCTION Cchar_to_Uchar(Cchar IN VARCHAR2) return VARCHAR2;
7 PRAGMA RESTRICT_REFERENCES(Cchar_to_Uchar, WNDS, WNPS);
8 
9 /* Converts a datetime varchar in canonical to a datetime
10    varchar in user display format */
11 FUNCTION CcharDT_to_Uchar(CcharDT IN VARCHAR2) return VARCHAR2;
12 PRAGMA RESTRICT_REFERENCES(CcharDT_to_Uchar, WNDS, WNPS);
13 
14 /* Converts a date varchar in canonical to a date[time] varchar
15    in whatever format passed in by Ofmt_mask */
16 FUNCTION Cchar_to_char(Cchar IN VARCHAR2, Ofmt_mask IN VARCHAR2) return VARCHAR2;
17 PRAGMA RESTRICT_REFERENCES(Cchar_to_char, WNDS, WNPS);
18 
19 /* Converts a datetime varchar in canonical to a date[time] varchar
20    in whatever format passed in by Ofmt_mask */
21 FUNCTION CcharDT_to_char(CcharDT IN VARCHAR2, Ofmt_mask IN VARCHAR2) return VARCHAR2;
22 PRAGMA RESTRICT_REFERENCES(CcharDT_to_char, WNDS, WNPS);
23 
24 /* canonical datetime varchar to date */
25 FUNCTION CcharDT_to_date(CcharDT IN VARCHAR2) RETURN DATE;
26 PRAGMA RESTRICT_REFERENCES(CcharDT_to_date, WNDS, WNPS);
27 
28 /* takes two datetime variables and returns their difference in minutes*/
29 FUNCTION datetime_diff_to_mins(dt1 DATE, dt2 DATE) RETURN NUMBER;
30 PRAGMA RESTRICT_REFERENCES(datetime_diff_to_mins, WNDS, WNPS);
31 
32 /* this function takes a date and a number (seconds to represent the
33    time since 00:00:00 of this date) and return a date */
34 FUNCTION Date_Timenum_to_DATE(dt dATE, time number) RETURN DATE;
35 PRAGMA RESTRICT_REFERENCES(Date_Timenum_to_DATE, WNDS, WNPS);
36 
37 /* this function returns the julian date in floating point format */
38 FUNCTION DT_to_float(dt DATE)  RETURN NUMBER;
39 PRAGMA RESTRICT_REFERENCES(DT_to_float, WNDS, WNPS);
40 
41 /* this function takes a julian date in a floating point format and returns a date */
42 FUNCTION float_to_DT(fdt NUMBER)  RETURN DATE;
43 PRAGMA RESTRICT_REFERENCES(float_to_DT, WNDS, WNPS);
44 
45 /* this function takes a  in a date only value in LE Timezone, appends 23:59:59
46  and then converts to the specified timezone */
47 
48 FUNCTION le_date_to_server(p_le_date DATE,
49                          p_org_id NUMBER) RETURN DATE;
50 
51 
52 END WIP_DATETIMES;