LAE

 View Only
  • 1.  WORKDAY() Excel function in Lavastorm

    Employee
    Posted 03-24-2019 16:42

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: MariaB

    Hi!

    I'm trying to replicate the WORKDAY() formula from Excel, which returns a date that is a given number of working days ahead of or prior to the start date.

    For example WORKDAY ('Start Date', 60) would return a Date 60 working days after the selected 'Start Date'.

    Is there a way to do the same in Lavastorm??

    Thanks a lot!
    Best,
    Maria


  • 2.  RE: WORKDAY() Excel function in Lavastorm

    Employee
    Posted 03-25-2019 04:32

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: awilliams1024

    Hi Maria,

    The dateAdjust() function does not take into consideration whether the adjustment period includes weekends so you would need to account for these days when determining the actual number of days to increment/decrement the start date by.

    Here is one way you could do this. It is relatively fast for smaller adjustments/number of records. However, due to the iterative nature of the adjustment mechanism used, there may be better ways of achieving this if there is a large adjustment period and/or many input records.

    Adjust_by_Workdays--share.brg


    Btw, there is an in-built node that calculates the converse - the number of working days between two dates (i.e. equivalent of the Excel networkday() or networkday.intl() functions); this is the Calculate Workdays node in the Profiling and Patterns category.

    Regards,
    Adrian


  • 3.  RE: WORKDAY() Excel function in Lavastorm

    Employee
    Posted 03-25-2019 14:56

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: MariaB

    Thanks a lot Adrian!

    It works perfectly for now!
    Hope it will continue to work for larger data sets as I'm currently working on a small sample, but in the meantime I'll keep your solution