ESP Workload Automation

  • 1.  Create date-range variables with javascript

    Posted Dec 14, 2016 12:40 PM

    Can someone tell me how to create two variables in javascript? For now forget about the Oracle Format, let's just get the syntax for MMDDYYYY.

     

                    start date - Monday prior week               %STARTDATE%  dd-mon-yyyy

                    end date - Sunday prior week                 %ENDDATE%     dd-mon-yyyy

     

    for example: For next Monday Dec. 19,2016, it would pass in: 1 12-dec-2016 18-dec-2016

    (passing in as Oracle format – dd-mon-yyyy)

     

    There are probably many different ways to capture previous day and day -7 to build the "start" and "end" date. I'm don't know javascript well enough to figure out the most efficient.

     

    Thanks,

    Ken Ski



  • 2.  Re: Create date-range variables with javascript

    Posted Dec 14, 2016 01:21 PM

    Never mind I figured it out.

     

    genTime('IDATE1', 'TODAY LESS 1 WEEK');
    APPL.PARM1=IDATE1DD + '-' + IDATE1MMM.toLowerCase() + '-' + IDATE1YEAR;

     

    genTime('IDATE2', 'TODAY LESS 1 DAY');
    APPL.PARM2=IDATE2DD + '-' + IDATE2MMM.toLowerCase() + '-' + IDATE2YEAR;