Clarity

 View Only
  • 1.  Calculated Attribute Date calculation

    Posted Jun 01, 2018 01:31 AM

    Hello all,

     

    I want to exclude weekends when calculating date difference in a calculated attribute of ca ppm. Does anyone know how to achieve that?

     

    Thank you,

    Vamshi.



  • 2.  Re: Calculated Attribute Date calculation

    Posted Jun 02, 2018 08:08 PM

    Hi Vamshi,

    Check out the Calculated Attributes topic in the following documentation. You may get some insight.

    CA PPM Studio Objects and Attributes- 15.4 (SaaS) 

     

     

     

    Let us know if you have any feedback.

     

    Regards, Sarmistha



  • 3.  Re: Calculated Attribute Date calculation

    Posted Jun 09, 2018 03:55 AM

    Hi Vamshi,

    Following logic gives the number of working days excluding weekends in sql,

    datediff(dd, inv.schedule_start, inv.schedule_finish) - (datediff(wk, inv.schedule_start, inv.schedule_finish) * 2) -
    case when datepart(dw, inv.schedule_start) = 1 then 1 else 0 end +
    case when datepart(dw, inv.schedule_finish) = 1 then 1 else 0

     

    You can use above logic to build your expression in calculated attribute.