To calculate cycle time

Certified Senior Developer

I want to calculate cycle time -difference between received date and closed date in days which includes only business days

Exclude weekends and public holidays 

Using recordtype-new custom record field I wanna to achieve as I need to use in process hq reports

Thanks,

Priyadharshini. S

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Step 1 — Create a Holiday Table in DB

    sql
    CREATE TABLE PUBLIC_HOLIDAYS (
      holiday_date DATE,
      holiday_name VARCHAR2(100)
    );

    Step 2 — Create an Expression Rule

    Build rule!CALC_BusinessDays(startDate, endDate)

    Step 3 — Custom Record Field

    rule!CALC_BusinessDays( startDate: recordType!YourRecord.fields.receivedDate, endDate: recordType!YourRecord.fields.closedDate )

     
Reply
  • 0
    Certified Lead Developer

    Step 1 — Create a Holiday Table in DB

    sql
    CREATE TABLE PUBLIC_HOLIDAYS (
      holiday_date DATE,
      holiday_name VARCHAR2(100)
    );

    Step 2 — Create an Expression Rule

    Build rule!CALC_BusinessDays(startDate, endDate)

    Step 3 — Custom Record Field

    rule!CALC_BusinessDays( startDate: recordType!YourRecord.fields.receivedDate, endDate: recordType!YourRecord.fields.closedDate )

     
Children
No Data