Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Jobs Sanity Check Index DDL scrips
Arguments Source

DATE_DIFF_IN_DAYS

DDL script

Arguments:

NameData TypeDefault ValueIn/Out
TS1TIMESTAMP WITH LOCAL TIME ZONE IN
TS2TIMESTAMP WITH TIME ZONE IN

Returns:

NUMBER(38)

Source

Legend: comment string keyword reserved word operator
     1: function date_diff_in_days(ts1 in timestamp with local time zone, ts2 in timestamp with time zone)
     2: return number is
     3:     difference interval day(9) to second(6);
     4: begin
     5:     difference := ts2 - ts1;
     6:     return extract(day from difference)
     7:         + extract(hour from difference) / 24
     8:         + extract(minute from difference) / (24 * 60)
     9:         + extract(second from difference) / (24 * 60 * 60);
    10: end date_diff_in_days;