Differences

This shows you the differences between two versions of the page.

Link to this comparison view

scheduler:showing_dates_in_a_schedule [2008/06/13 10:14] (current)
smthng created
Line 1: Line 1:
 +You can use the following code to show what dates are in a schedule or a repeat_interval. The procedure prints out dates in a particular schedule or repeat_interval.
 +
 +<code plsql>
 +create or replace procedure print_schedule_dates
 + (
 +   schedule in varchar2,
 +   start_date in timestamp with time zone default dbms_scheduler.stime(),
 +   number_of_dates in pls_integer default 10
 + )
 +is
 +  date_after timestamp with time zone := start_date - interval '1' second;
 +  next_date timestamp with time zone;
 +begin
 +  for i in 1 .. number_of_dates
 +  loop
 +    dbms_scheduler.evaluate_calendar_string
 +     (schedule, start_date, date_after, next_date);
 +
 +    dbms_output.put_line(to_char(next_date,
 +                    'DY DD-MON-YYYY (DDD-IW) HH24:MI:SS TZH:TZM TZR'));
 +
 +    date_after := next_date;
 +  end loop;
 +end;
 +/
 +</code>
  
Recent changes RSS feed Creative Commons License Donate Minima Template by Wikidesign Driven by DokuWiki