Skip to main content
November 5, 2021
Question

How to pass hours as 2nd parameter in caladdddays function

  • November 5, 2021
  • 5 replies
  • 0 views

Hi All,

In my  application, I have to use caladddays() function which calculates only the net work days and for daylight boundaries.

So for 72 hours, I will use caladddays(ri!date,3) ,  it works fine.(where ri!date = 1st November 2021,10:00 AM)

But the user wants to pass the 2nd parameter by constant and he wants to test for 1 hour by changing the constant value.

If I use caladdhours,the outputs are different  from caladddays, PFA the below screenshots,

If there is anyway to pass hours in caladddays function, can you please help me?

Thanks in advance.

Regards,

Jansi J

    5 replies

    richardm900458
    November 5, 2021

    cons!EXA_HOURS_ADDITONAL(type: int)
    
    caladddays(ri!date,3)+ cons!EXA_HOURS_ADDITONAL * hours()

    November 5, 2021

    Hi Richard,

    Thank you for your reply.

    I tried this but it is not working.

    caladddays(ri!date,3),here  3 is number of days ,but in place of 3 I want to pass hours constant .

    richardm900458
    November 5, 2021

    Hi jansij,

    then i missunderstood you.

    are you looking for additional working hours on top of your datetime?

    pass hours constant .

    I am not sure if we talk about the same sense of "constant" here.

     

    kind regards,

    Richard

    stefanhelzle0001
    Brainy
    November 5, 2021

    You can not add hours using the caladddays() function. If you need to use hours, then think in business hours. By default, 8 hours would be one day.

    November 5, 2021

    Okay, I got your point. Thanks for your reply.