ESP dSeries Workload Automation

 View Only
Expand all | Collapse all

CAWA DE 12.2 - using "daysBetween", "daysFrom" or "daysTo" to create variables??

  • 1.  CAWA DE 12.2 - using "daysBetween", "daysFrom" or "daysTo" to create variables??

    Posted Sep 25, 2020 02:18 PM
    Does anyone have an example using "daysBetween", "daysFrom" or "daysTo" to create variables based on a date range?

    Here are my dates:

    12/27/2020 thru 3/21/2021 = QTR1

    3/28/2021 thru 6/20/2021 = QTR2

    6/27/2021 thru 9/19/2021 = QTR3

    9/26/2021 thru 12/19/2021 = QTR4






  • 2.  RE: CAWA DE 12.2 - using "daysBetween", "daysFrom" or "daysTo" to create variables??

    Posted Sep 25, 2020 04:25 PM
    Andy Reimer helped me out. Thanks Andy!!

    APPL.QTR00='null';
    if (daysFrom('Sep 27,2020') >= 0 && daysTo('Dec 20,2020') >= 0) APPL.QTR00='4';
    if (daysFrom('Dec 27,2020') >= 0 && daysTo('Mar 21,2021') >= 0) APPL.QTR00='1';
    if (daysFrom('Mar 28,2021') >= 0 && daysTo('Jun 20,2021') >= 0) APPL.QTR00='2';
    if (daysFrom('Jun 28,2021') >= 0 && daysTo('Sep 19,2021') >= 0) APPL.QTR00='3';
    if (daysFrom('Sep 26,2021') >= 0 && daysTo('Dec 19,2021') >= 0) APPL.QTR00='4';