DATE_DIFF_IN_DAYS
DDL scriptArguments:
Name | Data Type | Default Value | In/Out |
---|
TS1 | TIMESTAMP WITH LOCAL TIME ZONE | | IN |
TS2 | TIMESTAMP WITH TIME ZONE | | IN |
Returns:
NUMBER(38)Source
Legend: 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;